@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
|
@@ -1,644 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* The kinds of dinosaur ta can be: the outline of each, its bones and its colors. dino-avatar.ts draws them. */
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.DinoSpecies = exports.SPECIES =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.LEG = 56;
|
|
9
|
-
function smooth(edge0, edge1, x) {
|
|
10
|
-
const t = Math.min(1, Math.max(0, (x - edge0) / (edge1 - edge0)));
|
|
11
|
-
return t * t * (3 - 2 * t);
|
|
12
|
-
}
|
|
13
|
-
const n = (value) => Math.round(value * 100) / 100;
|
|
14
|
-
var Outline;
|
|
15
|
-
(function (Outline) {
|
|
16
|
-
/**
|
|
17
|
-
* A closed outline through `keys`, as cubic Béziers that pass through each (Catmull-Rom); at a
|
|
18
|
-
* corner the curves on either side of it meet at an angle.
|
|
19
|
-
*/
|
|
20
|
-
function loop(keys) {
|
|
21
|
-
const at = (i) => keys[(i + keys.length) % keys.length];
|
|
22
|
-
let d = `M${n(keys[0][0])} ${n(keys[0][1])}`;
|
|
23
|
-
for (let i = 0; i < keys.length; i++) {
|
|
24
|
-
const [p0, p1, p2, p3] = [at(i - 1), at(i), at(i + 1), at(i + 2)];
|
|
25
|
-
const out = p1[2] ? [0, 0] : [(p2[0] - p0[0]) / 6, (p2[1] - p0[1]) / 6];
|
|
26
|
-
const into = p2[2] ? [0, 0] : [(p3[0] - p1[0]) / 6, (p3[1] - p1[1]) / 6];
|
|
27
|
-
d += `C${n(p1[0] + out[0])} ${n(p1[1] + out[1])} ${n(p2[0] - into[0])} ${n(p2[1] - into[1])} ${n(p2[0])} ${n(p2[1])}`;
|
|
28
|
-
}
|
|
29
|
-
return `${d}Z`;
|
|
30
|
-
}
|
|
31
|
-
Outline.loop = loop;
|
|
32
|
-
/** A circle as four curves, the hole of an eye. */
|
|
33
|
-
function circle(x, y, r) {
|
|
34
|
-
const k = r * 0.5523;
|
|
35
|
-
return (`M${n(x + r)} ${n(y)}C${n(x + r)} ${n(y + k)} ${n(x + k)} ${n(y + r)} ${n(x)} ${n(y + r)}` +
|
|
36
|
-
`C${n(x - k)} ${n(y + r)} ${n(x - r)} ${n(y + k)} ${n(x - r)} ${n(y)}` +
|
|
37
|
-
`C${n(x - r)} ${n(y - k)} ${n(x - k)} ${n(y - r)} ${n(x)} ${n(y - r)}` +
|
|
38
|
-
`C${n(x + k)} ${n(y - r)} ${n(x + r)} ${n(y - k)} ${n(x + r)} ${n(y)}Z`);
|
|
39
|
-
}
|
|
40
|
-
Outline.circle = circle;
|
|
41
|
-
})(Outline || (exports.Outline = Outline = {}));
|
|
42
|
-
/**
|
|
43
|
-
* Which side of a line a point is on, softly: 0 well before the line through `at`, 1 well past it
|
|
44
|
-
* in the direction `toward`, eased across `band` units on either side of it.
|
|
45
|
-
*/
|
|
46
|
-
function cut(at, toward, band) {
|
|
47
|
-
const length = Math.hypot(toward.x, toward.y);
|
|
48
|
-
const tx = toward.x / length;
|
|
49
|
-
const ty = toward.y / length;
|
|
50
|
-
return (x, y) => smooth(-band, band, (x - at.x) * tx + (y - at.y) * ty);
|
|
51
|
-
}
|
|
52
|
-
/** 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. */
|
|
53
|
-
function bones(cuts) {
|
|
54
|
-
const all = (sides, x, y) => sides.reduce((product, side) => product * side(x, y), 1);
|
|
55
|
-
return (x, y) => {
|
|
56
|
-
const head = all(cuts.head, x, y);
|
|
57
|
-
const jaw = head * all(cuts.jaw, x, y);
|
|
58
|
-
const tail = all(cuts.tail, x, y) * (1 - head);
|
|
59
|
-
const tip = tail * all(cuts.tip, x, y);
|
|
60
|
-
const back = all(cuts.back, x, y) * (1 - head - tail);
|
|
61
|
-
return { head: head - jaw, jaw, tail: tail - tip, tip, back, body: Math.max(0, 1 - head - tail - back) };
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/** The outline of assets/logo.svg; dino-avatar.spec.ts keeps the two the same. */
|
|
65
|
-
exports.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';
|
|
66
|
-
const [LOGO_BODY, LOGO_FRONT, LOGO_ARM, LOGO_EYE] = exports.LOGO_PATH.split(/(?<=Z)(?=M)/);
|
|
67
|
-
/** ta as the logo draws it. */
|
|
68
|
-
const TREX = {
|
|
69
|
-
id: 'trex',
|
|
70
|
-
skin: LOGO_BODY + LOGO_EYE,
|
|
71
|
-
parts: [
|
|
72
|
-
{ d: LOGO_FRONT, joint: { x: 146, y: 192 }, swing: 'front', lift: 'frontLift', far: true },
|
|
73
|
-
{ d: LOGO_ARM, joint: { x: 171, y: 149 }, swing: 'arm', far: false },
|
|
74
|
-
],
|
|
75
|
-
eye: { x: 141.3, y: 44.6, r: 10.9 },
|
|
76
|
-
joints: {
|
|
77
|
-
feet: { x: 128, y: 244 },
|
|
78
|
-
neck: { x: 122, y: 124 },
|
|
79
|
-
jaw: { x: 150, y: 94 },
|
|
80
|
-
tail: { x: 54, y: 160 },
|
|
81
|
-
tip: { x: 40, y: 112 },
|
|
82
|
-
hip: { x: 86, y: 188 },
|
|
83
|
-
},
|
|
84
|
-
weights(x, y) {
|
|
85
|
-
// The neck: a band across it, from the back of the neck down to the throat.
|
|
86
|
-
const across = ((x - 92) * 42 - (y - 106) * 76) / 86.8;
|
|
87
|
-
const head = smooth(-4, 24, across) * smooth(78, 96, x);
|
|
88
|
-
// The jaw: below the line of the mouth, fading at the corner of the mouth and down the throat.
|
|
89
|
-
const mouth = x >= 177 ? 96.5 : 80 + ((x - 143) * 16.5) / 34;
|
|
90
|
-
const jaw = head * smooth(mouth - 3, mouth + 4, y) * smooth(140, 152, x) * (1 - smooth(132, 146, y));
|
|
91
|
-
// The tail from where it leaves the back, and again toward its tip.
|
|
92
|
-
const tail = smooth(178, 128, y) * (1 - smooth(52, 92, x));
|
|
93
|
-
const tip = smooth(128, 86, y) * (1 - smooth(48, 70, x));
|
|
94
|
-
const back = smooth(186, 204, y) * (1 - smooth(108, 124, x));
|
|
95
|
-
return { head: head - jaw, jaw, tail: tail - tip, tip, back, body: Math.max(0, 1 - head - tail - back) };
|
|
96
|
-
},
|
|
97
|
-
head: { axis: { x: 132, y: 60 }, center: { x: 160, y: 60 }, depth: 22 },
|
|
98
|
-
body: { center: { x: 112, y: 160 }, depth: 26 },
|
|
99
|
-
colors: { skin: '#10B981', lit: '#34D399', shade: '#0EA372', ridge: '#047857' },
|
|
100
|
-
badge: { x: 54, y: 34 },
|
|
101
|
-
snout: { x: 238, y: 94 },
|
|
102
|
-
nose: { x: 222, y: 66 },
|
|
103
|
-
face: [76, -20, 184],
|
|
104
|
-
};
|
|
105
|
-
/** 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. */
|
|
106
|
-
function tones(skin) {
|
|
107
|
-
const rgb = [1, 3, 5].map(i => Number.parseInt(skin.slice(i, i + 2), 16));
|
|
108
|
-
const mix = (to, k) => `#${rgb
|
|
109
|
-
.map(c => Math.round(c + (to - c) * k)
|
|
110
|
-
.toString(16)
|
|
111
|
-
.padStart(2, '0'))
|
|
112
|
-
.join('')}`;
|
|
113
|
-
return { skin, lit: mix(255, 0.3), shade: mix(0, 0.12), ridge: mix(0, 0.38) };
|
|
114
|
-
}
|
|
115
|
-
/** A leg on its own, upright from `top` to the ground: its width, and how much its foot reaches forward. */
|
|
116
|
-
function leg(x, top, width, foot = 6, ground = 244) {
|
|
117
|
-
const mid = (top + ground) / 2;
|
|
118
|
-
return Outline.loop([
|
|
119
|
-
[x + width / 2, top - 4],
|
|
120
|
-
[x + width + 1, top + 4],
|
|
121
|
-
[x + width - 1, mid],
|
|
122
|
-
[x + width + foot, ground - 6],
|
|
123
|
-
[x + width + foot - 5, ground],
|
|
124
|
-
[x + 3, ground],
|
|
125
|
-
[x - 1, ground - 6],
|
|
126
|
-
[x + 1, mid],
|
|
127
|
-
[x - 1, top + 4],
|
|
128
|
-
]);
|
|
129
|
-
}
|
|
130
|
-
const left = (x, band) => cut({ x, y: 0 }, { x: -1, y: 0 }, band);
|
|
131
|
-
const right = (x, band) => cut({ x, y: 0 }, { x: 1, y: 0 }, band);
|
|
132
|
-
const below = (y, band) => cut({ x: 0, y }, { x: 0, y: 1 }, band);
|
|
133
|
-
/** Three horns and a frill; on four legs. */
|
|
134
|
-
const TRICERATOPS = {
|
|
135
|
-
id: 'triceratops',
|
|
136
|
-
turns: 0.4,
|
|
137
|
-
spins: 0.3,
|
|
138
|
-
leans: 0.35,
|
|
139
|
-
skin: Outline.loop([
|
|
140
|
-
[16, 186, 1],
|
|
141
|
-
[40, 166],
|
|
142
|
-
[64, 140],
|
|
143
|
-
[92, 118],
|
|
144
|
-
[122, 108],
|
|
145
|
-
[142, 110],
|
|
146
|
-
[140, 84],
|
|
147
|
-
[150, 58],
|
|
148
|
-
[174, 40],
|
|
149
|
-
[202, 38],
|
|
150
|
-
[218, 58],
|
|
151
|
-
[224, 76],
|
|
152
|
-
[232, 90],
|
|
153
|
-
[238, 98],
|
|
154
|
-
[244, 80, 1],
|
|
155
|
-
[246, 106],
|
|
156
|
-
[252, 122],
|
|
157
|
-
[250, 138],
|
|
158
|
-
[244, 142, 1],
|
|
159
|
-
[226, 140, 1],
|
|
160
|
-
[240, 150],
|
|
161
|
-
[234, 158],
|
|
162
|
-
[218, 166],
|
|
163
|
-
[198, 170],
|
|
164
|
-
[184, 180],
|
|
165
|
-
[172, 194],
|
|
166
|
-
[146, 202],
|
|
167
|
-
[118, 202],
|
|
168
|
-
[112, 206],
|
|
169
|
-
[112, 226],
|
|
170
|
-
[116, 238],
|
|
171
|
-
[112, 244],
|
|
172
|
-
[80, 244],
|
|
173
|
-
[74, 236],
|
|
174
|
-
[74, 222],
|
|
175
|
-
[66, 202],
|
|
176
|
-
[46, 194],
|
|
177
|
-
]) + Outline.circle(204, 104, 9),
|
|
178
|
-
parts: [
|
|
179
|
-
{ d: leg(116, 192, 24), joint: { x: 128, y: 198 }, swing: 'front', lift: 'frontLift', far: true },
|
|
180
|
-
{ d: leg(190, 170, 20), joint: { x: 200, y: 178 }, swing: 'back', lift: 'backLift', far: true },
|
|
181
|
-
{ d: leg(152, 166, 32), joint: { x: 168, y: 176 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
182
|
-
],
|
|
183
|
-
eye: { x: 204, y: 104, r: 9 },
|
|
184
|
-
joints: {
|
|
185
|
-
feet: { x: 130, y: 244 },
|
|
186
|
-
neck: { x: 170, y: 134 },
|
|
187
|
-
jaw: { x: 226, y: 140 },
|
|
188
|
-
tail: { x: 58, y: 170 },
|
|
189
|
-
tip: { x: 34, y: 178 },
|
|
190
|
-
hip: { x: 90, y: 196 },
|
|
191
|
-
},
|
|
192
|
-
weights: bones({
|
|
193
|
-
head: [cut({ x: 164, y: 136 }, { x: 76, y: -40 }, 12)],
|
|
194
|
-
jaw: [below(141, 3), right(208, 6)],
|
|
195
|
-
tail: [left(62, 14)],
|
|
196
|
-
tip: [left(34, 8)],
|
|
197
|
-
back: [below(204, 8), left(114, 6)],
|
|
198
|
-
}),
|
|
199
|
-
head: { axis: { x: 186, y: 100 }, center: { x: 206, y: 100 }, depth: 22 },
|
|
200
|
-
body: { center: { x: 112, y: 160 }, depth: 30 },
|
|
201
|
-
colors: tones('#EE7B3B'),
|
|
202
|
-
badge: { x: 60, y: 70 },
|
|
203
|
-
snout: { x: 252, y: 130 },
|
|
204
|
-
nose: { x: 238, y: 118 },
|
|
205
|
-
face: [132, 30, 132],
|
|
206
|
-
// Its two horns over the eyes, ivory, one on each side of its head.
|
|
207
|
-
decor: [
|
|
208
|
-
{
|
|
209
|
-
depth: 0.6,
|
|
210
|
-
markup: `<path d="${Outline.loop([
|
|
211
|
-
[212, 62],
|
|
212
|
-
[232, 50],
|
|
213
|
-
[254, 42, 1],
|
|
214
|
-
[234, 62],
|
|
215
|
-
[224, 74],
|
|
216
|
-
])}" fill="#F3DFC1"/>`,
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
};
|
|
220
|
-
/** Plates along its back and spikes at the end of its tail; on four legs, its head low. */
|
|
221
|
-
const STEGOSAURUS = {
|
|
222
|
-
id: 'stegosaurus',
|
|
223
|
-
turns: 0.4,
|
|
224
|
-
spins: 0.3,
|
|
225
|
-
leans: 0.35,
|
|
226
|
-
skin: Outline.loop([
|
|
227
|
-
[14, 180, 1],
|
|
228
|
-
[18, 168],
|
|
229
|
-
[4, 146, 1],
|
|
230
|
-
[32, 162],
|
|
231
|
-
[28, 140, 1],
|
|
232
|
-
[48, 154],
|
|
233
|
-
[62, 144],
|
|
234
|
-
[56, 108, 1],
|
|
235
|
-
[78, 128],
|
|
236
|
-
[86, 82, 1],
|
|
237
|
-
[106, 112],
|
|
238
|
-
[122, 70, 1],
|
|
239
|
-
[140, 106],
|
|
240
|
-
[160, 80, 1],
|
|
241
|
-
[170, 118],
|
|
242
|
-
[192, 104, 1],
|
|
243
|
-
[194, 134],
|
|
244
|
-
[210, 148],
|
|
245
|
-
[232, 156],
|
|
246
|
-
[248, 168],
|
|
247
|
-
[250, 178, 1],
|
|
248
|
-
[230, 180, 1],
|
|
249
|
-
[244, 186, 1],
|
|
250
|
-
[232, 194],
|
|
251
|
-
[212, 192],
|
|
252
|
-
[196, 198],
|
|
253
|
-
[184, 206],
|
|
254
|
-
[150, 212],
|
|
255
|
-
[124, 210],
|
|
256
|
-
[116, 214],
|
|
257
|
-
[114, 230],
|
|
258
|
-
[120, 238],
|
|
259
|
-
[116, 244],
|
|
260
|
-
[86, 244],
|
|
261
|
-
[80, 238],
|
|
262
|
-
[80, 226],
|
|
263
|
-
[72, 206],
|
|
264
|
-
[48, 194],
|
|
265
|
-
[28, 188],
|
|
266
|
-
]) + Outline.circle(228, 168, 6),
|
|
267
|
-
parts: [
|
|
268
|
-
{ d: leg(124, 200, 22), joint: { x: 134, y: 206 }, swing: 'front', lift: 'frontLift', far: true },
|
|
269
|
-
{ d: leg(200, 188, 18), joint: { x: 208, y: 194 }, swing: 'back', lift: 'backLift', far: true },
|
|
270
|
-
{ d: leg(170, 190, 26), joint: { x: 182, y: 198 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
271
|
-
],
|
|
272
|
-
eye: { x: 228, y: 168, r: 6 },
|
|
273
|
-
joints: {
|
|
274
|
-
feet: { x: 130, y: 244 },
|
|
275
|
-
neck: { x: 200, y: 168 },
|
|
276
|
-
jaw: { x: 230, y: 181 },
|
|
277
|
-
tail: { x: 60, y: 170 },
|
|
278
|
-
tip: { x: 32, y: 170 },
|
|
279
|
-
hip: { x: 94, y: 204 },
|
|
280
|
-
},
|
|
281
|
-
weights: bones({
|
|
282
|
-
head: [cut({ x: 204, y: 160 }, { x: 1, y: 0.3 }, 10)],
|
|
283
|
-
jaw: [below(181.5, 2.5), right(222, 5)],
|
|
284
|
-
tail: [left(58, 12)],
|
|
285
|
-
tip: [left(30, 8)],
|
|
286
|
-
back: [below(210, 8), left(118, 6)],
|
|
287
|
-
}),
|
|
288
|
-
head: { axis: { x: 220, y: 172 }, center: { x: 230, y: 174 }, depth: 14 },
|
|
289
|
-
body: { center: { x: 118, y: 168 }, depth: 30 },
|
|
290
|
-
colors: tones('#4285F4'),
|
|
291
|
-
badge: { x: 40, y: 82 },
|
|
292
|
-
snout: { x: 254, y: 178 },
|
|
293
|
-
nose: { x: 242, y: 171 },
|
|
294
|
-
face: [168, 112, 100],
|
|
295
|
-
};
|
|
296
|
-
/** A neck that reaches up to the trees; on four legs, the front ones long. */
|
|
297
|
-
const BRACHIOSAURUS = {
|
|
298
|
-
id: 'brachiosaurus',
|
|
299
|
-
turns: 0.45,
|
|
300
|
-
spins: 0.3,
|
|
301
|
-
leans: 0.35,
|
|
302
|
-
skin: Outline.loop([
|
|
303
|
-
[10, 170, 1],
|
|
304
|
-
[36, 150],
|
|
305
|
-
[66, 128],
|
|
306
|
-
[100, 112],
|
|
307
|
-
[132, 104],
|
|
308
|
-
[152, 98],
|
|
309
|
-
[164, 80],
|
|
310
|
-
[174, 56],
|
|
311
|
-
[182, 34],
|
|
312
|
-
[192, 18],
|
|
313
|
-
[212, 10],
|
|
314
|
-
[234, 18],
|
|
315
|
-
[242, 30, 1],
|
|
316
|
-
[222, 34, 1],
|
|
317
|
-
[238, 38, 1],
|
|
318
|
-
[226, 46],
|
|
319
|
-
[206, 48],
|
|
320
|
-
[200, 62],
|
|
321
|
-
[196, 86],
|
|
322
|
-
[194, 112],
|
|
323
|
-
[190, 136],
|
|
324
|
-
[184, 160],
|
|
325
|
-
[172, 178],
|
|
326
|
-
[140, 186],
|
|
327
|
-
[112, 184],
|
|
328
|
-
[104, 190],
|
|
329
|
-
[102, 222],
|
|
330
|
-
[108, 238],
|
|
331
|
-
[104, 244],
|
|
332
|
-
[76, 244],
|
|
333
|
-
[70, 238],
|
|
334
|
-
[70, 220],
|
|
335
|
-
[64, 192],
|
|
336
|
-
[42, 180],
|
|
337
|
-
]) + Outline.circle(212, 24, 5.5),
|
|
338
|
-
parts: [
|
|
339
|
-
{ d: leg(110, 184, 22), joint: { x: 120, y: 190 }, swing: 'front', lift: 'frontLift', far: true },
|
|
340
|
-
{ d: leg(186, 146, 18), joint: { x: 196, y: 154 }, swing: 'back', lift: 'backLift', far: true },
|
|
341
|
-
{ d: leg(158, 138, 28), joint: { x: 172, y: 148 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
342
|
-
],
|
|
343
|
-
eye: { x: 212, y: 24, r: 5.5 },
|
|
344
|
-
joints: {
|
|
345
|
-
feet: { x: 128, y: 244 },
|
|
346
|
-
neck: { x: 176, y: 112 },
|
|
347
|
-
jaw: { x: 222, y: 35 },
|
|
348
|
-
tail: { x: 52, y: 160 },
|
|
349
|
-
tip: { x: 28, y: 166 },
|
|
350
|
-
hip: { x: 86, y: 192 },
|
|
351
|
-
},
|
|
352
|
-
weights: bones({
|
|
353
|
-
head: [cut({ x: 176, y: 96 }, { x: 0.3, y: -1 }, 14)],
|
|
354
|
-
jaw: [below(35.5, 2), right(214, 5)],
|
|
355
|
-
tail: [left(54, 12)],
|
|
356
|
-
tip: [left(28, 8)],
|
|
357
|
-
back: [below(194, 8), left(110, 6)],
|
|
358
|
-
}),
|
|
359
|
-
head: { axis: { x: 204, y: 28 }, center: { x: 214, y: 28 }, depth: 12 },
|
|
360
|
-
body: { center: { x: 116, y: 150 }, depth: 30 },
|
|
361
|
-
colors: tones('#8C5CF0'),
|
|
362
|
-
badge: { x: 60, y: 64 },
|
|
363
|
-
snout: { x: 246, y: 30 },
|
|
364
|
-
nose: { x: 230, y: 20 },
|
|
365
|
-
face: [166, -6, 88],
|
|
366
|
-
};
|
|
367
|
-
/** Quick and lean, a long straight tail; on two legs. */
|
|
368
|
-
const VELOCIRAPTOR = {
|
|
369
|
-
id: 'velociraptor',
|
|
370
|
-
turns: 0.75,
|
|
371
|
-
spins: 0.7,
|
|
372
|
-
skin: Outline.loop([
|
|
373
|
-
[8, 118, 1],
|
|
374
|
-
[40, 110],
|
|
375
|
-
[76, 110],
|
|
376
|
-
[104, 112],
|
|
377
|
-
[130, 110],
|
|
378
|
-
[152, 98],
|
|
379
|
-
[164, 80],
|
|
380
|
-
[170, 62],
|
|
381
|
-
[162, 48, 1],
|
|
382
|
-
[180, 50],
|
|
383
|
-
[196, 50],
|
|
384
|
-
[224, 60],
|
|
385
|
-
[238, 70, 1],
|
|
386
|
-
[210, 76, 1],
|
|
387
|
-
[230, 80, 1],
|
|
388
|
-
[216, 88],
|
|
389
|
-
[192, 88],
|
|
390
|
-
[182, 104],
|
|
391
|
-
[178, 126],
|
|
392
|
-
[168, 146],
|
|
393
|
-
[150, 158],
|
|
394
|
-
[126, 160],
|
|
395
|
-
[114, 168],
|
|
396
|
-
[118, 196],
|
|
397
|
-
[112, 222],
|
|
398
|
-
[128, 236],
|
|
399
|
-
[124, 244],
|
|
400
|
-
[96, 244],
|
|
401
|
-
[92, 238],
|
|
402
|
-
[96, 222],
|
|
403
|
-
[90, 192],
|
|
404
|
-
[80, 164],
|
|
405
|
-
[66, 140],
|
|
406
|
-
[36, 128],
|
|
407
|
-
]) + Outline.circle(194, 64, 6.5),
|
|
408
|
-
parts: [
|
|
409
|
-
{
|
|
410
|
-
d: Outline.loop([
|
|
411
|
-
[126, 164],
|
|
412
|
-
[146, 168],
|
|
413
|
-
[150, 196],
|
|
414
|
-
[144, 222],
|
|
415
|
-
[160, 236],
|
|
416
|
-
[156, 242],
|
|
417
|
-
[130, 242],
|
|
418
|
-
[128, 236],
|
|
419
|
-
[130, 220],
|
|
420
|
-
[126, 192],
|
|
421
|
-
]),
|
|
422
|
-
joint: { x: 136, y: 170 },
|
|
423
|
-
swing: 'front',
|
|
424
|
-
lift: 'frontLift',
|
|
425
|
-
far: true,
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
d: Outline.loop([
|
|
429
|
-
[164, 130],
|
|
430
|
-
[180, 132],
|
|
431
|
-
[198, 152],
|
|
432
|
-
[192, 162, 1],
|
|
433
|
-
[178, 150],
|
|
434
|
-
[164, 144],
|
|
435
|
-
]),
|
|
436
|
-
joint: { x: 168, y: 136 },
|
|
437
|
-
swing: 'arm',
|
|
438
|
-
far: false,
|
|
439
|
-
gap: true,
|
|
440
|
-
},
|
|
441
|
-
],
|
|
442
|
-
eye: { x: 194, y: 64, r: 6.5 },
|
|
443
|
-
joints: {
|
|
444
|
-
feet: { x: 112, y: 244 },
|
|
445
|
-
neck: { x: 168, y: 104 },
|
|
446
|
-
jaw: { x: 210, y: 77 },
|
|
447
|
-
tail: { x: 84, y: 124 },
|
|
448
|
-
tip: { x: 40, y: 118 },
|
|
449
|
-
hip: { x: 100, y: 170 },
|
|
450
|
-
},
|
|
451
|
-
weights: bones({
|
|
452
|
-
head: [cut({ x: 172, y: 96 }, { x: 0.6, y: -1 }, 10)],
|
|
453
|
-
jaw: [below(78, 2.5), right(200, 5)],
|
|
454
|
-
tail: [left(84, 16), cut({ x: 0, y: 150 }, { x: 0, y: -1 }, 8)],
|
|
455
|
-
tip: [left(40, 10)],
|
|
456
|
-
back: [below(172, 8), left(122, 6)],
|
|
457
|
-
}),
|
|
458
|
-
head: { axis: { x: 186, y: 68 }, center: { x: 200, y: 70 }, depth: 14 },
|
|
459
|
-
body: { center: { x: 122, y: 140 }, depth: 20 },
|
|
460
|
-
colors: tones('#EA4335'),
|
|
461
|
-
badge: { x: 60, y: 58 },
|
|
462
|
-
snout: { x: 240, y: 72 },
|
|
463
|
-
nose: { x: 228, y: 64 },
|
|
464
|
-
face: [150, 16, 104],
|
|
465
|
-
};
|
|
466
|
-
/** Armored all over, spikes on its back and a club at the end of its tail; low, on four legs. */
|
|
467
|
-
const ANKYLOSAURUS = {
|
|
468
|
-
id: 'ankylosaurus',
|
|
469
|
-
turns: 0.4,
|
|
470
|
-
spins: 0.3,
|
|
471
|
-
leans: 0.35,
|
|
472
|
-
skin: Outline.loop([
|
|
473
|
-
[8, 174],
|
|
474
|
-
[2, 160],
|
|
475
|
-
[12, 146],
|
|
476
|
-
[28, 146],
|
|
477
|
-
[36, 156],
|
|
478
|
-
[52, 154],
|
|
479
|
-
[72, 140],
|
|
480
|
-
[88, 124],
|
|
481
|
-
[92, 108, 1],
|
|
482
|
-
[104, 116],
|
|
483
|
-
[122, 108],
|
|
484
|
-
[128, 94, 1],
|
|
485
|
-
[138, 106],
|
|
486
|
-
[156, 104],
|
|
487
|
-
[164, 92, 1],
|
|
488
|
-
[172, 108],
|
|
489
|
-
[188, 116],
|
|
490
|
-
[198, 108, 1],
|
|
491
|
-
[202, 124],
|
|
492
|
-
[214, 132],
|
|
493
|
-
[230, 136],
|
|
494
|
-
[246, 150],
|
|
495
|
-
[248, 160, 1],
|
|
496
|
-
[230, 160, 1],
|
|
497
|
-
[242, 168, 1],
|
|
498
|
-
[232, 176],
|
|
499
|
-
[214, 176],
|
|
500
|
-
[202, 182],
|
|
501
|
-
[190, 196],
|
|
502
|
-
[158, 204],
|
|
503
|
-
[124, 204],
|
|
504
|
-
[118, 208],
|
|
505
|
-
[118, 230],
|
|
506
|
-
[122, 238],
|
|
507
|
-
[118, 244],
|
|
508
|
-
[90, 244],
|
|
509
|
-
[86, 238],
|
|
510
|
-
[86, 226],
|
|
511
|
-
[80, 204],
|
|
512
|
-
[60, 186],
|
|
513
|
-
[40, 176],
|
|
514
|
-
[28, 172],
|
|
515
|
-
]) + Outline.circle(224, 148, 5.5),
|
|
516
|
-
parts: [
|
|
517
|
-
{ d: leg(126, 196, 22), joint: { x: 136, y: 202 }, swing: 'front', lift: 'frontLift', far: true },
|
|
518
|
-
{ d: leg(204, 182, 16), joint: { x: 212, y: 190 }, swing: 'back', lift: 'backLift', far: true },
|
|
519
|
-
{ d: leg(176, 184, 24), joint: { x: 188, y: 192 }, swing: 'front', lift: 'frontLift', far: false, gap: true },
|
|
520
|
-
],
|
|
521
|
-
eye: { x: 224, y: 148, r: 5.5 },
|
|
522
|
-
joints: {
|
|
523
|
-
feet: { x: 134, y: 244 },
|
|
524
|
-
neck: { x: 206, y: 156 },
|
|
525
|
-
jaw: { x: 230, y: 161 },
|
|
526
|
-
tail: { x: 74, y: 166 },
|
|
527
|
-
tip: { x: 40, y: 164 },
|
|
528
|
-
hip: { x: 100, y: 204 },
|
|
529
|
-
},
|
|
530
|
-
weights: bones({
|
|
531
|
-
head: [cut({ x: 208, y: 150 }, { x: 1, y: 0.1 }, 8)],
|
|
532
|
-
jaw: [below(161.5, 2), right(222, 5)],
|
|
533
|
-
tail: [left(72, 12)],
|
|
534
|
-
tip: [left(42, 8)],
|
|
535
|
-
back: [below(208, 8), left(122, 6)],
|
|
536
|
-
}),
|
|
537
|
-
head: { axis: { x: 216, y: 154 }, center: { x: 228, y: 154 }, depth: 14 },
|
|
538
|
-
body: { center: { x: 132, y: 160 }, depth: 34 },
|
|
539
|
-
colors: tones('#FBBC05'),
|
|
540
|
-
badge: { x: 54, y: 92 },
|
|
541
|
-
snout: { x: 252, y: 156 },
|
|
542
|
-
nose: { x: 240, y: 152 },
|
|
543
|
-
face: [172, 100, 92],
|
|
544
|
-
};
|
|
545
|
-
/** A flier: wings, a long beak and a crest behind it; it stands on small legs. */
|
|
546
|
-
const PTERANODON = {
|
|
547
|
-
id: 'pteranodon',
|
|
548
|
-
turns: 0.6,
|
|
549
|
-
spins: 0.6,
|
|
550
|
-
skin: Outline.loop([
|
|
551
|
-
[96, 196, 1],
|
|
552
|
-
[104, 170],
|
|
553
|
-
[108, 140],
|
|
554
|
-
[118, 112],
|
|
555
|
-
[134, 94],
|
|
556
|
-
[142, 80],
|
|
557
|
-
[112, 58, 1],
|
|
558
|
-
[150, 62],
|
|
559
|
-
[168, 64],
|
|
560
|
-
[204, 76],
|
|
561
|
-
[246, 94, 1],
|
|
562
|
-
[190, 90, 1],
|
|
563
|
-
[230, 98, 1],
|
|
564
|
-
[196, 102],
|
|
565
|
-
[172, 100],
|
|
566
|
-
[160, 108],
|
|
567
|
-
[152, 128],
|
|
568
|
-
[150, 156],
|
|
569
|
-
[144, 184],
|
|
570
|
-
[140, 198],
|
|
571
|
-
[144, 222],
|
|
572
|
-
[154, 238],
|
|
573
|
-
[150, 244],
|
|
574
|
-
[128, 244],
|
|
575
|
-
[124, 238],
|
|
576
|
-
[128, 222],
|
|
577
|
-
[122, 204],
|
|
578
|
-
[110, 204],
|
|
579
|
-
]) + Outline.circle(176, 78, 6.5),
|
|
580
|
-
parts: [
|
|
581
|
-
{
|
|
582
|
-
d: Outline.loop([
|
|
583
|
-
[144, 112],
|
|
584
|
-
[138, 74],
|
|
585
|
-
[130, 40],
|
|
586
|
-
[104, 6, 1],
|
|
587
|
-
[106, 36],
|
|
588
|
-
[112, 70],
|
|
589
|
-
[126, 108],
|
|
590
|
-
]),
|
|
591
|
-
joint: { x: 140, y: 116 },
|
|
592
|
-
swing: 'wing',
|
|
593
|
-
far: true,
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
d: Outline.loop([
|
|
597
|
-
[142, 118],
|
|
598
|
-
[114, 92],
|
|
599
|
-
[86, 60],
|
|
600
|
-
[18, 40, 1],
|
|
601
|
-
[38, 66],
|
|
602
|
-
[64, 92],
|
|
603
|
-
[98, 124],
|
|
604
|
-
[134, 148],
|
|
605
|
-
]),
|
|
606
|
-
joint: { x: 138, y: 126 },
|
|
607
|
-
swing: 'wing',
|
|
608
|
-
far: false,
|
|
609
|
-
gap: true,
|
|
610
|
-
},
|
|
611
|
-
],
|
|
612
|
-
eye: { x: 176, y: 78, r: 6.5 },
|
|
613
|
-
joints: {
|
|
614
|
-
feet: { x: 138, y: 244 },
|
|
615
|
-
neck: { x: 150, y: 108 },
|
|
616
|
-
jaw: { x: 190, y: 92 },
|
|
617
|
-
tail: { x: 110, y: 190 },
|
|
618
|
-
tip: { x: 102, y: 196 },
|
|
619
|
-
hip: { x: 134, y: 200 },
|
|
620
|
-
},
|
|
621
|
-
weights: bones({
|
|
622
|
-
head: [cut({ x: 150, y: 104 }, { x: 0.5, y: -1 }, 10)],
|
|
623
|
-
jaw: [below(94, 2), right(184, 5)],
|
|
624
|
-
tail: [left(112, 6), below(186, 6)],
|
|
625
|
-
tip: [left(102, 6)],
|
|
626
|
-
back: [below(202, 6)],
|
|
627
|
-
}),
|
|
628
|
-
head: { axis: { x: 166, y: 80 }, center: { x: 176, y: 82 }, depth: 12 },
|
|
629
|
-
body: { center: { x: 130, y: 160 }, depth: 18 },
|
|
630
|
-
colors: tones('#45B5E8'),
|
|
631
|
-
badge: { x: 222, y: 38 },
|
|
632
|
-
snout: { x: 248, y: 96 },
|
|
633
|
-
nose: { x: 222, y: 88 },
|
|
634
|
-
face: [120, 18, 142],
|
|
635
|
-
};
|
|
3
|
+
exports.DinoSpecies = exports.SPECIES = void 0;
|
|
4
|
+
/* The kinds of dinosaur ta can be: the outline of each, its bones and its colors. dino-avatar.ts draws them. */
|
|
5
|
+
const dino_kinds_1 = require("./dino-kinds");
|
|
6
|
+
const dino_shape_1 = require("./dino-shape");
|
|
636
7
|
/** A long crest curving back from its head, a bill like a duck's; on two legs. */
|
|
637
8
|
const PARASAUROLOPHUS = {
|
|
638
9
|
id: 'parasaurolophus',
|
|
639
10
|
turns: 0.75,
|
|
640
11
|
spins: 0.7,
|
|
641
|
-
skin: Outline.loop([
|
|
12
|
+
skin: dino_shape_1.Outline.loop([
|
|
642
13
|
[10, 150, 1],
|
|
643
14
|
[40, 136],
|
|
644
15
|
[70, 124],
|
|
@@ -676,10 +47,10 @@ const PARASAUROLOPHUS = {
|
|
|
676
47
|
[80, 168],
|
|
677
48
|
[60, 150],
|
|
678
49
|
[34, 152],
|
|
679
|
-
]) + Outline.circle(196, 56, 6.5),
|
|
50
|
+
]) + dino_shape_1.Outline.circle(196, 56, 6.5),
|
|
680
51
|
parts: [
|
|
681
52
|
{
|
|
682
|
-
d: Outline.loop([
|
|
53
|
+
d: dino_shape_1.Outline.loop([
|
|
683
54
|
[126, 166],
|
|
684
55
|
[148, 170],
|
|
685
56
|
[150, 200],
|
|
@@ -697,7 +68,7 @@ const PARASAUROLOPHUS = {
|
|
|
697
68
|
far: true,
|
|
698
69
|
},
|
|
699
70
|
{
|
|
700
|
-
d: Outline.loop([
|
|
71
|
+
d: dino_shape_1.Outline.loop([
|
|
701
72
|
[166, 130],
|
|
702
73
|
[182, 132],
|
|
703
74
|
[194, 160],
|
|
@@ -720,47 +91,23 @@ const PARASAUROLOPHUS = {
|
|
|
720
91
|
tip: { x: 40, y: 146 },
|
|
721
92
|
hip: { x: 100, y: 172 },
|
|
722
93
|
},
|
|
723
|
-
weights: bones({
|
|
724
|
-
head: [cut({ x: 172, y: 92 }, { x: 0.5, y: -1 }, 10)],
|
|
725
|
-
jaw: [below(68, 2), right(204, 5)],
|
|
726
|
-
tail: [left(84, 16), cut({ x: 0, y: 164 }, { x: 0, y: -1 }, 8)],
|
|
727
|
-
tip: [left(40, 10)],
|
|
728
|
-
back: [below(174, 8), left(124, 6)],
|
|
94
|
+
weights: (0, dino_shape_1.bones)({
|
|
95
|
+
head: [(0, dino_shape_1.cut)({ x: 172, y: 92 }, { x: 0.5, y: -1 }, 10)],
|
|
96
|
+
jaw: [(0, dino_shape_1.below)(68, 2), (0, dino_shape_1.right)(204, 5)],
|
|
97
|
+
tail: [(0, dino_shape_1.left)(84, 16), (0, dino_shape_1.cut)({ x: 0, y: 164 }, { x: 0, y: -1 }, 8)],
|
|
98
|
+
tip: [(0, dino_shape_1.left)(40, 10)],
|
|
99
|
+
back: [(0, dino_shape_1.below)(174, 8), (0, dino_shape_1.left)(124, 6)],
|
|
729
100
|
}),
|
|
730
101
|
head: { axis: { x: 186, y: 58 }, center: { x: 200, y: 60 }, depth: 14 },
|
|
731
102
|
body: { center: { x: 122, y: 140 }, depth: 24 },
|
|
732
|
-
colors: tones('#F27BA6'),
|
|
103
|
+
colors: (0, dino_shape_1.tones)('#F27BA6'),
|
|
733
104
|
badge: { x: 54, y: 66 },
|
|
734
105
|
snout: { x: 240, y: 64 },
|
|
735
106
|
nose: { x: 228, y: 58 },
|
|
736
107
|
face: [114, -4, 134],
|
|
737
108
|
};
|
|
738
|
-
/**
|
|
739
|
-
* The two sides of a body as long as a snake's, along its `spine` ([x, y, half its thickness] from the head
|
|
740
|
-
* on): the side to the right of the way the spine runs, and the other, both from the head on. `spikes` puts
|
|
741
|
-
* a spike on the other side (the back) between every two points of the spine from the second on.
|
|
742
|
-
*/
|
|
743
|
-
function tube(spine, spikes = 0) {
|
|
744
|
-
const front = [];
|
|
745
|
-
const back = [];
|
|
746
|
-
spine.forEach(([x, y, r], i) => {
|
|
747
|
-
const [px, py] = spine[Math.max(0, i - 1)];
|
|
748
|
-
const [nx, ny] = spine[Math.min(spine.length - 1, i + 1)];
|
|
749
|
-
const length = Math.hypot(nx - px, ny - py);
|
|
750
|
-
const ux = (ny - py) / length;
|
|
751
|
-
const uy = -(nx - px) / length;
|
|
752
|
-
front.push([x + r * ux, y + r * uy]);
|
|
753
|
-
back.push([x - r * ux, y - r * uy]);
|
|
754
|
-
if (spikes && i > 0 && i + 1 < spine.length) {
|
|
755
|
-
// A spike halfway to the next point, standing off the back.
|
|
756
|
-
const [mx, my, mr] = [(x + nx) / 2, (y + ny) / 2, (r + spine[i + 1][2]) / 2];
|
|
757
|
-
back.push([mx - (mr + spikes) * ux, my - (mr + spikes) * uy, 1]);
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
return { front, back };
|
|
761
|
-
}
|
|
762
109
|
const GOLD = '#F2B92E';
|
|
763
|
-
const DRAGON_BODY = tube([
|
|
110
|
+
const DRAGON_BODY = (0, dino_shape_1.tube)([
|
|
764
111
|
[184, 96, 15],
|
|
765
112
|
[170, 124, 17],
|
|
766
113
|
[152, 154, 19],
|
|
@@ -779,7 +126,7 @@ const DRAGON = {
|
|
|
779
126
|
turns: 0.7,
|
|
780
127
|
spins: 0.5,
|
|
781
128
|
premium: true,
|
|
782
|
-
skin: Outline.loop([
|
|
129
|
+
skin: dino_shape_1.Outline.loop([
|
|
783
130
|
[166, 70],
|
|
784
131
|
[168, 54],
|
|
785
132
|
[176, 44],
|
|
@@ -804,15 +151,15 @@ const DRAGON = {
|
|
|
804
151
|
[16, 120],
|
|
805
152
|
[14, 98, 1],
|
|
806
153
|
...DRAGON_BODY.back.reverse(),
|
|
807
|
-
]) + Outline.circle(204, 64, 7),
|
|
154
|
+
]) + dino_shape_1.Outline.circle(204, 64, 7),
|
|
808
155
|
parts: [
|
|
809
156
|
// On four legs: each with the one across from it, the near hind leg with the far front one.
|
|
810
|
-
{ d: leg(134, 180, 16, 8), joint: { x: 142, y: 186 }, swing: 'back', lift: 'backLift', far: true },
|
|
811
|
-
{ d: leg(82, 166, 15, 8), joint: { x: 90, y: 172 }, swing: 'front', lift: 'frontLift', far: true },
|
|
812
|
-
{ d: leg(104, 180, 18, 9), joint: { x: 112, y: 186 }, swing: 'back', lift: 'backLift', far: false, gap: true },
|
|
813
|
-
{ d: Outline.circle(222, 160, 10), joint: { x: 176, y: 140 }, swing: 'arm', far: false, fill: '#FFF1C1', gap: true },
|
|
157
|
+
{ d: (0, dino_shape_1.leg)(134, 180, 16, 8), joint: { x: 142, y: 186 }, swing: 'back', lift: 'backLift', far: true },
|
|
158
|
+
{ d: (0, dino_shape_1.leg)(82, 166, 15, 8), joint: { x: 90, y: 172 }, swing: 'front', lift: 'frontLift', far: true },
|
|
159
|
+
{ d: (0, dino_shape_1.leg)(104, 180, 18, 9), joint: { x: 112, y: 186 }, swing: 'back', lift: 'backLift', far: false, gap: true },
|
|
160
|
+
{ d: dino_shape_1.Outline.circle(222, 160, 10), joint: { x: 176, y: 140 }, swing: 'arm', far: false, fill: '#FFF1C1', gap: true },
|
|
814
161
|
{
|
|
815
|
-
d: Outline.loop([
|
|
162
|
+
d: dino_shape_1.Outline.loop([
|
|
816
163
|
[168, 134],
|
|
817
164
|
[184, 134],
|
|
818
165
|
[204, 146],
|
|
@@ -838,16 +185,16 @@ const DRAGON = {
|
|
|
838
185
|
tip: { x: 40, y: 104 },
|
|
839
186
|
hip: { x: 112, y: 186 },
|
|
840
187
|
},
|
|
841
|
-
weights: bones({
|
|
842
|
-
head: [cut({ x: 176, y: 104 }, { x: 0.45, y: -1 }, 10)],
|
|
843
|
-
jaw: [below(83, 3), right(214, 5)],
|
|
844
|
-
tail: [left(76, 12)],
|
|
845
|
-
tip: [left(40, 10)],
|
|
188
|
+
weights: (0, dino_shape_1.bones)({
|
|
189
|
+
head: [(0, dino_shape_1.cut)({ x: 176, y: 104 }, { x: 0.45, y: -1 }, 10)],
|
|
190
|
+
jaw: [(0, dino_shape_1.below)(83, 3), (0, dino_shape_1.right)(214, 5)],
|
|
191
|
+
tail: [(0, dino_shape_1.left)(76, 12)],
|
|
192
|
+
tip: [(0, dino_shape_1.left)(40, 10)],
|
|
846
193
|
back: [() => 0],
|
|
847
194
|
}),
|
|
848
195
|
head: { axis: { x: 192, y: 66 }, center: { x: 206, y: 70 }, depth: 18 },
|
|
849
196
|
body: { center: { x: 110, y: 160 }, depth: 18 },
|
|
850
|
-
colors: { ...tones(GOLD), sheen: ['#FCD866', '#D98E14'] },
|
|
197
|
+
colors: { ...(0, dino_shape_1.tones)(GOLD), sheen: ['#FCD866', '#D98E14'] },
|
|
851
198
|
badge: { x: 112, y: 54 },
|
|
852
199
|
snout: { x: 252, y: 76 },
|
|
853
200
|
nose: { x: 240, y: 70 },
|
|
@@ -856,7 +203,7 @@ const DRAGON = {
|
|
|
856
203
|
decor: [
|
|
857
204
|
{
|
|
858
205
|
depth: 0.5,
|
|
859
|
-
markup: `<path d="${Outline.loop([
|
|
206
|
+
markup: `<path d="${dino_shape_1.Outline.loop([
|
|
860
207
|
[176, 46],
|
|
861
208
|
[158, 42, 1],
|
|
862
209
|
[166, 56],
|
|
@@ -872,7 +219,7 @@ const DRAGON = {
|
|
|
872
219
|
},
|
|
873
220
|
{
|
|
874
221
|
depth: 0.6,
|
|
875
|
-
markup: `<path d="${Outline.loop([
|
|
222
|
+
markup: `<path d="${dino_shape_1.Outline.loop([
|
|
876
223
|
[174, 50],
|
|
877
224
|
[168, 34],
|
|
878
225
|
[154, 26, 1],
|
|
@@ -890,7 +237,7 @@ const DRAGON = {
|
|
|
890
237
|
},
|
|
891
238
|
{
|
|
892
239
|
depth: 0,
|
|
893
|
-
markup: `<path d="${Outline.loop([
|
|
240
|
+
markup: `<path d="${dino_shape_1.Outline.loop([
|
|
894
241
|
[214, 104],
|
|
895
242
|
[228, 106],
|
|
896
243
|
[222, 118],
|
|
@@ -903,14 +250,14 @@ const DRAGON = {
|
|
|
903
250
|
],
|
|
904
251
|
};
|
|
905
252
|
/** The kinds, in the order they are offered; the first is the logo, and the one ta is until the user picks another. */
|
|
906
|
-
exports.SPECIES = [TREX, TRICERATOPS, STEGOSAURUS, BRACHIOSAURUS, VELOCIRAPTOR, ANKYLOSAURUS, PTERANODON, PARASAUROLOPHUS, DRAGON];
|
|
253
|
+
exports.SPECIES = [dino_kinds_1.TREX, dino_kinds_1.TRICERATOPS, dino_kinds_1.STEGOSAURUS, dino_kinds_1.BRACHIOSAURUS, dino_kinds_1.VELOCIRAPTOR, dino_kinds_1.ANKYLOSAURUS, dino_kinds_1.PTERANODON, PARASAUROLOPHUS, DRAGON];
|
|
907
254
|
var DinoSpecies;
|
|
908
255
|
(function (DinoSpecies) {
|
|
909
256
|
DinoSpecies.DEFAULT = 'trex';
|
|
910
257
|
DinoSpecies.IDS = exports.SPECIES.map(species => species.id);
|
|
911
258
|
function of(id) {
|
|
912
259
|
var _a;
|
|
913
|
-
return (_a = exports.SPECIES.find(species => species.id === id)) !== null && _a !== void 0 ? _a : TREX;
|
|
260
|
+
return (_a = exports.SPECIES.find(species => species.id === id)) !== null && _a !== void 0 ? _a : dino_kinds_1.TREX;
|
|
914
261
|
}
|
|
915
262
|
DinoSpecies.of = of;
|
|
916
263
|
})(DinoSpecies || (exports.DinoSpecies = DinoSpecies = {}));
|