weasel-icons 0.14.0 → 0.14.2
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.md +8 -0
- package/dist/icons/can/can-rig.d.ts +32 -17
- package/dist/icons/can/can-rig.js +29 -30
- package/dist/icons/candy-corn/candy-corn-rig.d.ts +39 -12
- package/dist/icons/candy-corn/candy-corn-rig.js +71 -19
- package/dist/icons/fountain/fountain-rig.d.ts +28 -2
- package/dist/icons/fountain/fountain-rig.js +37 -10
- package/dist/icons/frankenstein/frankenstein-rig.d.ts +17 -5
- package/dist/icons/frankenstein/frankenstein-rig.js +22 -6
- package/dist/icons/grill-fork/grill-fork-rig.d.ts +8 -6
- package/dist/icons/grill-fork/grill-fork-rig.js +12 -7
- package/dist/icons/mummy/mummy-rig.d.ts +24 -24
- package/dist/icons/mummy/mummy-rig.js +49 -55
- package/dist/icons/rat/rat-rig.d.ts +16 -13
- package/dist/icons/rat/rat-rig.js +47 -39
- package/dist/icons/tombstone/tombstone-rig.d.ts +33 -18
- package/dist/icons/tombstone/tombstone-rig.js +40 -37
- package/dist/icons/vampire/vampire-rig.d.ts +20 -13
- package/dist/icons/vampire/vampire-rig.js +43 -43
- package/dist/shared/articulated-icon.js +9 -5
- package/dist/shared/articulation.d.ts +2 -0
- package/dist/source.json +1 -1
- package/package.json +1 -1
- package/skill-data/customize/references/motion.md +4 -0
- package/skill-data/customize/references/review.md +1 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
// Original Weasel
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
// cracked: A jagged crack travels down from the stone’s top edge
|
|
5
|
-
// haunted: Two plain bats pass above the RIP stone; no eyes appear inside it
|
|
1
|
+
// Original Weasel geometry and state choreography, refined from the existing glyph.
|
|
2
|
+
// One fixed arched stone, base and filled RIP carving in every state.
|
|
3
|
+
// Two small main-ink bat silhouettes pass through reserved air above the crown; no eyes inside the stone.
|
|
6
4
|
export const tombstoneStates = ['intact', 'cracked', 'haunted'];
|
|
7
5
|
export const tombstoneArt = {
|
|
8
6
|
name: 'tombstone',
|
|
@@ -14,24 +12,31 @@ export const tombstoneArt = {
|
|
|
14
12
|
],
|
|
15
13
|
poses: [
|
|
16
14
|
{
|
|
15
|
+
x: 8,
|
|
16
|
+
y: -3.4,
|
|
17
|
+
scaleX: 0.52,
|
|
18
|
+
scaleY: 0.52,
|
|
17
19
|
opacity: 0,
|
|
18
20
|
},
|
|
19
21
|
{
|
|
22
|
+
x: 8,
|
|
23
|
+
y: -3.4,
|
|
24
|
+
scaleX: 0.52,
|
|
25
|
+
scaleY: 0.52,
|
|
20
26
|
opacity: 0,
|
|
21
27
|
},
|
|
22
28
|
{
|
|
23
29
|
x: 8,
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
y: -3.4,
|
|
31
|
+
scaleX: 0.52,
|
|
32
|
+
scaleY: 0.52,
|
|
26
33
|
},
|
|
27
34
|
],
|
|
28
|
-
detail: true,
|
|
29
|
-
surface: true,
|
|
30
35
|
pivot: [12, 4.5],
|
|
31
36
|
pathOffsets: [
|
|
32
37
|
[
|
|
33
|
-
0,
|
|
34
|
-
0.5, 0,
|
|
38
|
+
0, 0.8, 0, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.8, 0, 0.8, 0, 0.8, 0, 0.5, 0, 0, 0,
|
|
39
|
+
0.5, 0, 0.8,
|
|
35
40
|
],
|
|
36
41
|
],
|
|
37
42
|
gestures: [
|
|
@@ -81,45 +86,33 @@ export const tombstoneArt = {
|
|
|
81
86
|
],
|
|
82
87
|
},
|
|
83
88
|
],
|
|
89
|
+
fillOnly: 'ink',
|
|
84
90
|
},
|
|
85
91
|
{
|
|
86
92
|
name: 'stone',
|
|
87
|
-
paths: ['M6
|
|
93
|
+
paths: ['M6 19V9.3C6 4.233333 18 4.233333 18 9.3V19'],
|
|
88
94
|
poses: [{}, {}, {}],
|
|
89
95
|
surface: true,
|
|
90
|
-
pathStates: [
|
|
91
|
-
['M6 18V8C6 1.5 18 1.5 18 8V18'],
|
|
92
|
-
['M6 18V8C6 1.5 18 1.5 18 8V18'],
|
|
93
|
-
['M6 18V12.5C6 7.5 18 7.5 18 12.5V18'],
|
|
94
|
-
],
|
|
95
96
|
},
|
|
96
97
|
{
|
|
97
98
|
name: 'plinth',
|
|
98
|
-
paths: ['M4.5
|
|
99
|
+
paths: ['M4.5 19H19.5V21H4.5Z'],
|
|
99
100
|
poses: [{}, {}, {}],
|
|
100
101
|
surface: true,
|
|
101
102
|
},
|
|
102
103
|
{
|
|
103
104
|
name: 'epitaph',
|
|
104
105
|
paths: [
|
|
105
|
-
'M8
|
|
106
|
-
'
|
|
107
|
-
'
|
|
108
|
-
'M12.4 10V13.8',
|
|
109
|
-
'M14.5 13.8V10H15.7Q17 10 17 11.1Q17 12.2 15.7 12.2H14.5',
|
|
106
|
+
'M8 12H9.55C11.5 12 11.7 14.35 10.15 14.75L11.25 16H10.05L9.1 14.85H8.9V16H8Z M8.9 12.8V14.05H9.55C10.45 14.05 10.45 12.8 9.55 12.8Z',
|
|
107
|
+
'M11.9 12H12.8V16H11.9Z',
|
|
108
|
+
'M13.5 12H15C17.1 12 17.1 15 15 15H14.4V16H13.5Z M14.4 12.8V14.2H15C16 14.2 16 12.8 15 12.8Z',
|
|
110
109
|
],
|
|
111
|
-
poses: [
|
|
112
|
-
|
|
113
|
-
{},
|
|
114
|
-
{
|
|
115
|
-
y: 1.8,
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
detail: true,
|
|
110
|
+
poses: [{}, {}, {}],
|
|
111
|
+
fillOnly: 'ink',
|
|
119
112
|
},
|
|
120
113
|
{
|
|
121
114
|
name: 'crack',
|
|
122
|
-
paths: ['M12
|
|
115
|
+
paths: ['M12 5.5L11.1 7.3L12.6 8.2L11.7 10.2'],
|
|
123
116
|
poses: [
|
|
124
117
|
{
|
|
125
118
|
opacity: 0,
|
|
@@ -132,7 +125,7 @@ export const tombstoneArt = {
|
|
|
132
125
|
],
|
|
133
126
|
accent: true,
|
|
134
127
|
detail: true,
|
|
135
|
-
traceLength:
|
|
128
|
+
traceLength: 5.954917968149532,
|
|
136
129
|
gestures: [
|
|
137
130
|
null,
|
|
138
131
|
{
|
|
@@ -160,22 +153,31 @@ export const tombstoneArt = {
|
|
|
160
153
|
],
|
|
161
154
|
poses: [
|
|
162
155
|
{
|
|
156
|
+
x: -8,
|
|
157
|
+
y: -3,
|
|
158
|
+
scaleX: 0.7,
|
|
159
|
+
scaleY: 0.7,
|
|
163
160
|
opacity: 0,
|
|
164
161
|
},
|
|
165
162
|
{
|
|
163
|
+
x: -8,
|
|
164
|
+
y: -3,
|
|
165
|
+
scaleX: 0.7,
|
|
166
|
+
scaleY: 0.7,
|
|
166
167
|
opacity: 0,
|
|
167
168
|
},
|
|
168
169
|
{
|
|
169
170
|
x: -8,
|
|
171
|
+
y: -3,
|
|
172
|
+
scaleX: 0.7,
|
|
173
|
+
scaleY: 0.7,
|
|
170
174
|
},
|
|
171
175
|
],
|
|
172
|
-
detail: true,
|
|
173
|
-
surface: true,
|
|
174
176
|
pivot: [12, 4.5],
|
|
175
177
|
pathOffsets: [
|
|
176
178
|
[
|
|
177
|
-
0,
|
|
178
|
-
0.5, 0,
|
|
179
|
+
0, 0.8, 0, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.8, 0, 0.8, 0, 0.8, 0, 0.5, 0, 0, 0,
|
|
180
|
+
0.5, 0, 0.8,
|
|
179
181
|
],
|
|
180
182
|
],
|
|
181
183
|
gestures: [
|
|
@@ -232,6 +234,7 @@ export const tombstoneArt = {
|
|
|
232
234
|
],
|
|
233
235
|
},
|
|
234
236
|
],
|
|
237
|
+
fillOnly: 'ink',
|
|
235
238
|
},
|
|
236
239
|
],
|
|
237
240
|
};
|
|
@@ -4,10 +4,10 @@ export declare const vampireArt: {
|
|
|
4
4
|
readonly name: "vampire";
|
|
5
5
|
readonly parts: readonly [{
|
|
6
6
|
readonly name: "cape-left";
|
|
7
|
-
readonly paths: readonly ["M12 21.5Q8.5 21.3 6.5 19.5Q3.
|
|
7
|
+
readonly paths: readonly ["M12 21.5Q8.5 21.3 6.5 19.5Q3.5 15.5 2.5 7.5Q5.2 8.4 7.5 12.7C9 15.8 10.8 18 12 18.8"];
|
|
8
8
|
readonly poses: readonly [{}, {}, {}];
|
|
9
9
|
readonly surface: true;
|
|
10
|
-
readonly pathStates: readonly [readonly ["M12 21.5Q8.5 21.3 6.5 19.5Q3.
|
|
10
|
+
readonly pathStates: readonly [readonly ["M12 21.5Q8.5 21.3 6.5 19.5Q3.5 15.5 2.5 7.5Q5.2 8.4 7.5 12.7C9 15.8 10.8 18 12 18.8"], readonly ["M12 21.5Q8.5 21.3 6.5 19.5Q3.5 15.5 2.5 7.5Q5.2 8.4 7.5 12.7C9 15.8 10.8 18 12 18.8"], readonly ["M11.3 14.5Q9.7 12.4 8 14.3Q6.8 12.3 5.3 14.5Q3.8 11.4 2.5 6.5C6.5 7 9 8.8 11.3 10"]];
|
|
11
11
|
readonly pathOffsets: readonly [readonly [0, 0, 0, -0.1, 0, -0.3, 0, -0.2, 0, -0.6, 0, -0.9, 0, -1.7, 0, -1, 0, -0.3, 0, 0]];
|
|
12
12
|
readonly gestures: readonly [null, null, {
|
|
13
13
|
readonly duration: 0.85;
|
|
@@ -28,10 +28,10 @@ export declare const vampireArt: {
|
|
|
28
28
|
}];
|
|
29
29
|
}, {
|
|
30
30
|
readonly name: "cape-right";
|
|
31
|
-
readonly paths: readonly ["M12 21.5Q15.5 21.3 17.5 19.5Q20.
|
|
31
|
+
readonly paths: readonly ["M12 21.5Q15.5 21.3 17.5 19.5Q20.5 15.5 21.5 7.5Q18.8 8.4 16.5 12.7C15 15.8 13.2 18 12 18.8"];
|
|
32
32
|
readonly poses: readonly [{}, {}, {}];
|
|
33
33
|
readonly surface: true;
|
|
34
|
-
readonly pathStates: readonly [readonly ["M12 21.5Q15.5 21.3 17.5 19.5Q20.
|
|
34
|
+
readonly pathStates: readonly [readonly ["M12 21.5Q15.5 21.3 17.5 19.5Q20.5 15.5 21.5 7.5Q18.8 8.4 16.5 12.7C15 15.8 13.2 18 12 18.8"], readonly ["M12 21.5Q15.5 21.3 17.5 19.5Q20.5 15.5 21.5 7.5Q18.8 8.4 16.5 12.7C15 15.8 13.2 18 12 18.8"], readonly ["M12.7 14.5Q14.3 12.4 16 14.3Q17.2 12.3 18.7 14.5Q20.2 11.4 21.5 6.5C17.5 7 15 8.8 12.7 10"]];
|
|
35
35
|
readonly pathOffsets: readonly [readonly [0, 0, 0, -0.1, 0, -0.3, 0, -0.2, 0, -0.6, 0, -0.9, 0, -1.7, 0, -1, 0, -0.3, 0, 0]];
|
|
36
36
|
readonly gestures: readonly [null, null, {
|
|
37
37
|
readonly duration: 0.85;
|
|
@@ -58,11 +58,12 @@ export declare const vampireArt: {
|
|
|
58
58
|
readonly pathStates: readonly [readonly ["M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.3 11.5Q17 15.8 12 18Q7 15.8 6.7 11.5Z"], readonly ["M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.3 11.5Q17 15.8 12 18Q7 15.8 6.7 11.5Z"], readonly ["M9.8 6C9.8 6 11.2 7.6 12 8C12.8 7.6 14.2 6 14.2 6L14 11.8Q13.8 14.2 12 15.7Q10.2 14.2 10 11.8Z"]];
|
|
59
59
|
}, {
|
|
60
60
|
readonly name: "widows-peak";
|
|
61
|
-
readonly paths: readonly ["M6.2 7.
|
|
61
|
+
readonly paths: readonly ["M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.8 7.6Q15.3 5.6 12 8.4Q8.7 5.6 6.2 7.6Z"];
|
|
62
62
|
readonly poses: readonly [{}, {}, {
|
|
63
63
|
readonly opacity: 0;
|
|
64
64
|
}];
|
|
65
|
-
readonly
|
|
65
|
+
readonly fillOnly: "ink";
|
|
66
|
+
readonly pathStates: readonly [readonly ["M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.8 7.6Q15.3 5.6 12 8.4Q8.7 5.6 6.2 7.6Z"], readonly ["M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.8 7.6Q15.3 5.6 12 8.4Q8.7 5.6 6.2 7.6Z"], readonly ["M10 9C10 9 11 8.5 12 9C13 8.5 14 9 14 9L14 9Q13 8.5 12 9Q11 8.5 10 9Z"]];
|
|
66
67
|
}, {
|
|
67
68
|
readonly name: "eyes";
|
|
68
69
|
readonly paths: readonly ["M8.6 10.4L10 10.8", "M15.4 10.4L14 10.8"];
|
|
@@ -71,21 +72,27 @@ export declare const vampireArt: {
|
|
|
71
72
|
readonly pathStates: readonly [readonly ["M8.6 10.4L10 10.8", "M15.4 10.4L14 10.8"], readonly ["M8.6 10.4L10 10.8", "M15.4 10.4L14 10.8"], readonly ["M10.3 10.8L11.1 10.8", "M13.7 10.8L12.9 10.8"]];
|
|
72
73
|
}, {
|
|
73
74
|
readonly name: "mouth";
|
|
74
|
-
readonly paths: readonly ["
|
|
75
|
-
readonly poses: readonly [{}, {
|
|
75
|
+
readonly paths: readonly ["M9 12.8Q12 14 15 12.8Q14.5 14 12 14.2Q9.5 14 9 12.8Z"];
|
|
76
|
+
readonly poses: readonly [{}, {
|
|
77
|
+
readonly flex: 1;
|
|
78
|
+
}, {
|
|
76
79
|
readonly opacity: 0;
|
|
77
80
|
}];
|
|
78
|
-
readonly
|
|
79
|
-
readonly pathStates: readonly [readonly ["
|
|
81
|
+
readonly fillOnly: "ink";
|
|
82
|
+
readonly pathStates: readonly [readonly ["M9 12.8Q12 14 15 12.8Q14.5 14 12 14.2Q9.5 14 9 12.8Z"], readonly ["M9 12.5Q12 13.9 15 12.5Q14.5 15.6 12 15.6Q9.5 15.6 9 12.5Z"], readonly ["M11.3 12Q12 12.4 12.7 12Q12.6 13 12 13Q11.4 13 11.3 12Z"]];
|
|
80
83
|
}, {
|
|
81
84
|
readonly name: "fangs";
|
|
82
|
-
readonly paths: readonly ["M9.4 13.
|
|
85
|
+
readonly paths: readonly ["M9.7 12.788556Q10.4 13.039 11.1 13.137L10.4 14.7Z", "M12.9 13.137Q13.6 13.039 14.3 12.788556L13.6 14.7Z"];
|
|
83
86
|
readonly poses: readonly [{
|
|
84
87
|
readonly opacity: 0;
|
|
85
88
|
}, {}, {
|
|
86
89
|
readonly opacity: 0;
|
|
87
90
|
}];
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
91
|
+
readonly fillOnly: "surface";
|
|
92
|
+
readonly revealAfter: {
|
|
93
|
+
readonly part: "mouth";
|
|
94
|
+
readonly flex: readonly [0.25, 0.65];
|
|
95
|
+
};
|
|
96
|
+
readonly pathStates: readonly [readonly ["M9.7 13.047333Q10.4 13.262 11.1 13.346L10.4 13.229333Z", "M12.9 13.346Q13.6 13.262 14.3 13.047333L13.6 13.229333Z"], readonly ["M9.7 12.788556Q10.4 13.039 11.1 13.137L10.4 14.7Z", "M12.9 13.137Q13.6 13.039 14.3 12.788556L13.6 14.7Z"], readonly ["M11.463333 12.082444Q11.626667 12.154 11.79 12.182L11.626667 12.143111Z", "M12.21 12.182Q12.373333 12.154 12.536667 12.082444L12.373333 12.143111Z"]];
|
|
90
97
|
}];
|
|
91
98
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// Original Weasel outline and state choreography. Structural observations are retained in the external review record.
|
|
2
|
-
//
|
|
2
|
+
// Raised cape collar sits behind the cheeks and opens into the existing bat wings.
|
|
3
|
+
// Watching and baring-fangs share one fixed face outline. The mouth opens inside it.
|
|
4
|
+
// Solid hair and mouth use main ink; white, unoutlined canines stay inside the mouth.
|
|
3
5
|
// watching: A broad Dracula face framed by swept hair and a tall pointed collar
|
|
4
|
-
// baring-fangs: Two
|
|
6
|
+
// baring-fangs: Two pointed canine triangles show beneath the upper smile
|
|
5
7
|
// bat: The pointed collar opens into wings as the face draws inward into a small bat
|
|
6
8
|
export const vampireStates = ['watching', 'baring-fangs', 'bat'];
|
|
7
9
|
export const vampireArt = {
|
|
@@ -9,12 +11,14 @@ export const vampireArt = {
|
|
|
9
11
|
parts: [
|
|
10
12
|
{
|
|
11
13
|
name: 'cape-left',
|
|
12
|
-
paths: [
|
|
14
|
+
paths: [
|
|
15
|
+
'M12 21.5Q8.5 21.3 6.5 19.5Q3.5 15.5 2.5 7.5Q5.2 8.4 7.5 12.7C9 15.8 10.8 18 12 18.8',
|
|
16
|
+
],
|
|
13
17
|
poses: [{}, {}, {}],
|
|
14
18
|
surface: true,
|
|
15
19
|
pathStates: [
|
|
16
|
-
['M12 21.5Q8.5 21.3 6.5 19.5Q3.
|
|
17
|
-
['M12 21.5Q8.5 21.3 6.5 19.5Q3.
|
|
20
|
+
['M12 21.5Q8.5 21.3 6.5 19.5Q3.5 15.5 2.5 7.5Q5.2 8.4 7.5 12.7C9 15.8 10.8 18 12 18.8'],
|
|
21
|
+
['M12 21.5Q8.5 21.3 6.5 19.5Q3.5 15.5 2.5 7.5Q5.2 8.4 7.5 12.7C9 15.8 10.8 18 12 18.8'],
|
|
18
22
|
['M11.3 14.5Q9.7 12.4 8 14.3Q6.8 12.3 5.3 14.5Q3.8 11.4 2.5 6.5C6.5 7 9 8.8 11.3 10'],
|
|
19
23
|
],
|
|
20
24
|
pathOffsets: [
|
|
@@ -50,16 +54,16 @@ export const vampireArt = {
|
|
|
50
54
|
{
|
|
51
55
|
name: 'cape-right',
|
|
52
56
|
paths: [
|
|
53
|
-
'M12 21.5Q15.5 21.3 17.5 19.5Q20.
|
|
57
|
+
'M12 21.5Q15.5 21.3 17.5 19.5Q20.5 15.5 21.5 7.5Q18.8 8.4 16.5 12.7C15 15.8 13.2 18 12 18.8',
|
|
54
58
|
],
|
|
55
59
|
poses: [{}, {}, {}],
|
|
56
60
|
surface: true,
|
|
57
61
|
pathStates: [
|
|
58
62
|
[
|
|
59
|
-
'M12 21.5Q15.5 21.3 17.5 19.5Q20.
|
|
63
|
+
'M12 21.5Q15.5 21.3 17.5 19.5Q20.5 15.5 21.5 7.5Q18.8 8.4 16.5 12.7C15 15.8 13.2 18 12 18.8',
|
|
60
64
|
],
|
|
61
65
|
[
|
|
62
|
-
'M12 21.5Q15.5 21.3 17.5 19.5Q20.
|
|
66
|
+
'M12 21.5Q15.5 21.3 17.5 19.5Q20.5 15.5 21.5 7.5Q18.8 8.4 16.5 12.7C15 15.8 13.2 18 12 18.8',
|
|
63
67
|
],
|
|
64
68
|
[
|
|
65
69
|
'M12.7 14.5Q14.3 12.4 16 14.3Q17.2 12.3 18.7 14.5Q20.2 11.4 21.5 6.5C17.5 7 15 8.8 12.7 10',
|
|
@@ -112,18 +116,15 @@ export const vampireArt = {
|
|
|
112
116
|
},
|
|
113
117
|
{
|
|
114
118
|
name: 'widows-peak',
|
|
115
|
-
paths: [
|
|
116
|
-
|
|
117
|
-
{},
|
|
118
|
-
{},
|
|
119
|
-
{
|
|
120
|
-
opacity: 0,
|
|
121
|
-
},
|
|
119
|
+
paths: [
|
|
120
|
+
'M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.8 7.6Q15.3 5.6 12 8.4Q8.7 5.6 6.2 7.6Z',
|
|
122
121
|
],
|
|
122
|
+
poses: [{}, {}, { opacity: 0 }],
|
|
123
|
+
fillOnly: 'ink',
|
|
123
124
|
pathStates: [
|
|
124
|
-
['M6.2 7.
|
|
125
|
-
['M6.2 7.
|
|
126
|
-
['M10
|
|
125
|
+
['M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.8 7.6Q15.3 5.6 12 8.4Q8.7 5.6 6.2 7.6Z'],
|
|
126
|
+
['M6 7C5.5 2.8 9 2 12 2.8C15 2 18.5 2.8 18 7L17.8 7.6Q15.3 5.6 12 8.4Q8.7 5.6 6.2 7.6Z'],
|
|
127
|
+
['M10 9C10 9 11 8.5 12 9C13 8.5 14 9 14 9L14 9Q13 8.5 12 9Q11 8.5 10 9Z'],
|
|
127
128
|
],
|
|
128
129
|
},
|
|
129
130
|
{
|
|
@@ -139,38 +140,37 @@ export const vampireArt = {
|
|
|
139
140
|
},
|
|
140
141
|
{
|
|
141
142
|
name: 'mouth',
|
|
142
|
-
paths: ['
|
|
143
|
-
poses: [
|
|
144
|
-
|
|
145
|
-
{},
|
|
146
|
-
{
|
|
147
|
-
opacity: 0,
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
detail: true,
|
|
143
|
+
paths: ['M9 12.8Q12 14 15 12.8Q14.5 14 12 14.2Q9.5 14 9 12.8Z'],
|
|
144
|
+
poses: [{}, { flex: 1 }, { opacity: 0 }],
|
|
145
|
+
fillOnly: 'ink',
|
|
151
146
|
pathStates: [
|
|
152
|
-
['
|
|
153
|
-
['
|
|
154
|
-
['M11 12.
|
|
147
|
+
['M9 12.8Q12 14 15 12.8Q14.5 14 12 14.2Q9.5 14 9 12.8Z'],
|
|
148
|
+
['M9 12.5Q12 13.9 15 12.5Q14.5 15.6 12 15.6Q9.5 15.6 9 12.5Z'],
|
|
149
|
+
['M11.3 12Q12 12.4 12.7 12Q12.6 13 12 13Q11.4 13 11.3 12Z'],
|
|
155
150
|
],
|
|
156
151
|
},
|
|
157
152
|
{
|
|
158
153
|
name: 'fangs',
|
|
159
|
-
paths: [
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
opacity: 0,
|
|
163
|
-
},
|
|
164
|
-
{},
|
|
165
|
-
{
|
|
166
|
-
opacity: 0,
|
|
167
|
-
},
|
|
154
|
+
paths: [
|
|
155
|
+
'M9.7 12.788556Q10.4 13.039 11.1 13.137L10.4 14.7Z',
|
|
156
|
+
'M12.9 13.137Q13.6 13.039 14.3 12.788556L13.6 14.7Z',
|
|
168
157
|
],
|
|
169
|
-
|
|
158
|
+
poses: [{ opacity: 0 }, {}, { opacity: 0 }],
|
|
159
|
+
fillOnly: 'surface',
|
|
160
|
+
revealAfter: { part: 'mouth', flex: [0.25, 0.65] },
|
|
170
161
|
pathStates: [
|
|
171
|
-
[
|
|
172
|
-
|
|
173
|
-
|
|
162
|
+
[
|
|
163
|
+
'M9.7 13.047333Q10.4 13.262 11.1 13.346L10.4 13.229333Z',
|
|
164
|
+
'M12.9 13.346Q13.6 13.262 14.3 13.047333L13.6 13.229333Z',
|
|
165
|
+
],
|
|
166
|
+
[
|
|
167
|
+
'M9.7 12.788556Q10.4 13.039 11.1 13.137L10.4 14.7Z',
|
|
168
|
+
'M12.9 13.137Q13.6 13.039 14.3 12.788556L13.6 14.7Z',
|
|
169
|
+
],
|
|
170
|
+
[
|
|
171
|
+
'M11.463333 12.082444Q11.626667 12.154 11.79 12.182L11.626667 12.143111Z',
|
|
172
|
+
'M12.21 12.182Q12.373333 12.154 12.536667 12.082444L12.373333 12.143111Z',
|
|
173
|
+
],
|
|
174
174
|
],
|
|
175
175
|
},
|
|
176
176
|
],
|
|
@@ -6,15 +6,19 @@ import { usePoseWeight, useStateChannels, useBehaviorClock } from "./use-icon-mo
|
|
|
6
6
|
import { useMotionPreference } from "./use-motion-preference.js";
|
|
7
7
|
import { sampleArticulation } from "./articulation.js";
|
|
8
8
|
const ORIGIN = { originX: '0px', originY: '0px', transformBox: 'view-box' };
|
|
9
|
-
function PartPath({ part, index, pathIndex, rig, }) {
|
|
9
|
+
function PartPath({ part, index, pathIndex, rig, ink, }) {
|
|
10
10
|
const d = useTransform(rig, (sample) => sample[index].paths[pathIndex]);
|
|
11
11
|
const offset = useTransform(rig, (sample) => (part.traceLength ?? 0) * (1 - sample[index].draw));
|
|
12
|
-
return (_jsx(motion.path, { d: d, fill: part.
|
|
12
|
+
return (_jsx(motion.path, { d: d, fill: part.fillOnly === 'ink'
|
|
13
|
+
? ink
|
|
14
|
+
: part.fillOnly === 'surface' || part.surface
|
|
15
|
+
? 'var(--weasel-surface, #fff)'
|
|
16
|
+
: undefined, stroke: part.fillOnly ? 'none' : undefined, strokeDasharray: part.traceLength, strokeDashoffset: part.traceLength ? offset : undefined }));
|
|
13
17
|
}
|
|
14
|
-
function Part({ part, index, rig, name, accentColor, strokeWidth, }) {
|
|
18
|
+
function Part({ part, index, rig, name, accentColor, color, strokeWidth, }) {
|
|
15
19
|
const transform = useTransform(rig, (sample) => sample[index].transform);
|
|
16
20
|
const opacity = useTransform(rig, (sample) => sample[index].opacity);
|
|
17
|
-
return (_jsx(motion.g, { "data-layer": `${name}-${part.name}`, "data-part": part.name, transform: transform, opacity: opacity, style: ORIGIN, stroke: part.accent ? accentColor : undefined, strokeWidth: part.detail ? Math.min(strokeWidth * 0.8, 1.5) : undefined, children: part.paths.map((_, i) => (_jsx(PartPath, { part: part, index: index, pathIndex: i, rig: rig }, i))) }));
|
|
21
|
+
return (_jsx(motion.g, { "data-layer": `${name}-${part.name}`, "data-part": part.name, transform: transform, opacity: opacity, style: ORIGIN, stroke: part.accent ? accentColor : undefined, strokeWidth: part.detail ? Math.min(strokeWidth * 0.8, 1.5) : undefined, children: part.paths.map((_, i) => (_jsx(PartPath, { part: part, index: index, pathIndex: i, rig: rig, ink: part.accent ? accentColor : color }, i))) }));
|
|
18
22
|
}
|
|
19
23
|
/** Shared binding, never a shared drawing or a generic whole-icon animation. */
|
|
20
24
|
export function ArticulatedIcon({ art, states, state = states[0], size = 24, color = 'currentColor', accentColor = 'currentColor', strokeWidth = 1.65, speed = 1, alive = false, className, }) {
|
|
@@ -37,5 +41,5 @@ export function ArticulatedIcon({ art, states, state = states[0], size = 24, col
|
|
|
37
41
|
const life = usePoseWeight(performs, pace, reduced);
|
|
38
42
|
const time = useBehaviorClock(element, performs, pace, life, art.parts.some((part) => Boolean(part.spin)));
|
|
39
43
|
const rig = useTransform(() => sampleArticulation(art, channels.map((channel) => channel.weight.get()), time.get(), life.get(), channels.map((channel) => channel.entry.get())));
|
|
40
|
-
return (_jsx("svg", { ref: element, className: className, width: size, height: size, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: color, strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", pointerEvents: "none", style: { display: 'block' }, children: _jsx("g", { "data-layer": `${art.name}-body`, transform: "translate(12 12) scale(.84) translate(-12 -12)", children: art.parts.map((part, index) => (_jsx(Part, { part: part, index: index, rig: rig, name: art.name, accentColor: accentColor, strokeWidth: strokeWidth }, part.name))) }) }));
|
|
44
|
+
return (_jsx("svg", { ref: element, className: className, width: size, height: size, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: color, strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", pointerEvents: "none", style: { display: 'block' }, children: _jsx("g", { "data-layer": `${art.name}-body`, transform: "translate(12 12) scale(.84) translate(-12 -12)", children: art.parts.map((part, index) => (_jsx(Part, { part: part, index: index, rig: rig, name: art.name, accentColor: accentColor, color: color, strokeWidth: strokeWidth }, part.name))) }) }));
|
|
41
45
|
}
|
|
@@ -37,6 +37,8 @@ export interface ArticulatedPart {
|
|
|
37
37
|
/** Status details retain room inside a heavier structural outline. */
|
|
38
38
|
detail?: boolean;
|
|
39
39
|
surface?: boolean;
|
|
40
|
+
/** Solid ink or neutral cutouts, without an additional outline. */
|
|
41
|
+
fillOnly?: 'ink' | 'surface';
|
|
40
42
|
traceLength?: number;
|
|
41
43
|
/** Reveal only after an earlier part's actual flex pose clears this detail. */
|
|
42
44
|
revealAfter?: {
|