@maas/vue-equipment 1.2.0 → 1.4.0
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/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +3 -2
- package/dist/plugins/MagicDotMatrix/index.d.ts +14 -0
- package/dist/plugins/MagicDotMatrix/index.mjs +20 -0
- package/dist/plugins/MagicDotMatrix/nuxt.d.ts +0 -0
- package/dist/plugins/MagicDotMatrix/nuxt.mjs +29 -0
- package/dist/plugins/MagicDotMatrix/src/components/MagicDotMatrix.d.vue.ts +10 -0
- package/dist/plugins/MagicDotMatrix/src/components/MagicDotMatrix.vue +103 -0
- package/dist/plugins/MagicDotMatrix/src/components/MagicDotMatrix.vue.d.ts +10 -0
- package/dist/plugins/MagicDotMatrix/src/composables/private/useDotMatrixApi.d.ts +10 -0
- package/dist/plugins/MagicDotMatrix/src/composables/private/useDotMatrixApi.mjs +82 -0
- package/dist/plugins/MagicDotMatrix/src/composables/private/useDotMatrixState.d.ts +6 -0
- package/dist/plugins/MagicDotMatrix/src/composables/private/useDotMatrixState.mjs +71 -0
- package/dist/plugins/MagicDotMatrix/src/composables/useMagicDotMatrix.d.ts +10 -0
- package/dist/plugins/MagicDotMatrix/src/composables/useMagicDotMatrix.mjs +27 -0
- package/dist/plugins/MagicDotMatrix/src/composables/useMagicDotMatrixEmoji.d.ts +19 -0
- package/dist/plugins/MagicDotMatrix/src/composables/useMagicDotMatrixEmoji.mjs +50 -0
- package/dist/plugins/MagicDotMatrix/src/types/index.d.ts +40 -0
- package/dist/plugins/MagicDotMatrix/src/types/index.mjs +0 -0
- package/dist/plugins/MagicDotMatrix/src/utils/defaultOptions.d.ts +4 -0
- package/dist/plugins/MagicDotMatrix/src/utils/defaultOptions.mjs +14 -0
- package/dist/plugins/MagicDotMatrix/src/utils/emoji/animateEmoji.d.ts +5 -0
- package/dist/plugins/MagicDotMatrix/src/utils/emoji/animateEmoji.mjs +296 -0
- package/dist/plugins/MagicDotMatrix/src/utils/emoji/motions.d.ts +382 -0
- package/dist/plugins/MagicDotMatrix/src/utils/emoji/motions.mjs +420 -0
- package/dist/plugins/MagicDotMatrix/src/utils/emoji/pickMotion.d.ts +7 -0
- package/dist/plugins/MagicDotMatrix/src/utils/emoji/pickMotion.mjs +153 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/bounce.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/bounce.mjs +8 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/checkerboard.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/checkerboard.mjs +18 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/comet.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/comet.mjs +5 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/drift.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/drift.mjs +38 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/equalizer.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/equalizer.mjs +14 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/fill.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/fill.mjs +10 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/focus.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/focus.mjs +5 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/index.d.ts +12 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/index.mjs +12 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/orbit.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/orbit.mjs +8 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/pulse.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/pulse.mjs +7 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/ripple.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/ripple.mjs +5 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/scan.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/scan.mjs +6 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/spiral.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/presets/spiral.mjs +34 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/equalizerFrame.d.ts +7 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/equalizerFrame.mjs +12 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/getRings.d.ts +2 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/getRings.mjs +24 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/ringPath.d.ts +7 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/ringPath.mjs +35 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/toIndex.d.ts +6 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/toIndex.mjs +3 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/withTrail.d.ts +6 -0
- package/dist/plugins/MagicDotMatrix/src/utils/sequence/withTrail.mjs +17 -0
- package/dist/plugins/MagicDrawer/src/components/MagicDrawerTrigger.d.vue.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawerTrigger.vue +5 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawerTrigger.vue.d.ts +1 -1
- package/dist/plugins/MagicEmitter/src/types/index.d.ts +2 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +13 -3
- package/dist/plugins/MagicTray/src/components/MagicTrayTrigger.d.vue.ts +1 -1
- package/dist/plugins/MagicTray/src/components/MagicTrayTrigger.vue +27 -7
- package/dist/plugins/MagicTray/src/components/MagicTrayTrigger.vue.d.ts +1 -1
- package/dist/plugins/MagicTray/src/composables/private/useTrayGesture.d.ts +2 -2
- package/dist/plugins/MagicTray/src/composables/private/useTrayGesture.mjs +93 -20
- package/package.json +2 -3
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { motions } from "./motions.mjs";
|
|
2
|
+
import { pickMotion } from "./pickMotion.mjs";
|
|
3
|
+
const cellSize = 24;
|
|
4
|
+
const fontSize = 320;
|
|
5
|
+
const fontFamily = '"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';
|
|
6
|
+
function createContext(width, height) {
|
|
7
|
+
const canvas = document.createElement("canvas");
|
|
8
|
+
canvas.width = width;
|
|
9
|
+
canvas.height = height;
|
|
10
|
+
return canvas.getContext("2d", { willReadFrequently: true });
|
|
11
|
+
}
|
|
12
|
+
function renderSource(emoji) {
|
|
13
|
+
const measure = createContext(1, 1);
|
|
14
|
+
if (!measure) {
|
|
15
|
+
return void 0;
|
|
16
|
+
}
|
|
17
|
+
measure.font = `${fontSize}px ${fontFamily}`;
|
|
18
|
+
const context = createContext(
|
|
19
|
+
Math.ceil(measure.measureText(emoji).width) + fontSize,
|
|
20
|
+
fontSize * 2
|
|
21
|
+
);
|
|
22
|
+
if (!context) {
|
|
23
|
+
return void 0;
|
|
24
|
+
}
|
|
25
|
+
const { width, height } = context.canvas;
|
|
26
|
+
context.font = `${fontSize}px ${fontFamily}`;
|
|
27
|
+
context.fillStyle = "#fff";
|
|
28
|
+
context.textAlign = "center";
|
|
29
|
+
context.textBaseline = "middle";
|
|
30
|
+
context.fillText(emoji, width / 2, height / 2);
|
|
31
|
+
const { data } = context.getImageData(0, 0, width, height);
|
|
32
|
+
let left = width;
|
|
33
|
+
let top = height;
|
|
34
|
+
let right = -1;
|
|
35
|
+
let bottom = -1;
|
|
36
|
+
for (let y = 0; y < height; y++) {
|
|
37
|
+
for (let x = 0; x < width; x++) {
|
|
38
|
+
if ((data[(y * width + x) * 4 + 3] ?? 0) > 0) {
|
|
39
|
+
left = Math.min(left, x);
|
|
40
|
+
right = Math.max(right, x);
|
|
41
|
+
top = Math.min(top, y);
|
|
42
|
+
bottom = Math.max(bottom, y);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (right < 0) {
|
|
47
|
+
return void 0;
|
|
48
|
+
}
|
|
49
|
+
const cropped = createContext(right - left + 1, bottom - top + 1);
|
|
50
|
+
if (!cropped) {
|
|
51
|
+
return void 0;
|
|
52
|
+
}
|
|
53
|
+
cropped.drawImage(
|
|
54
|
+
context.canvas,
|
|
55
|
+
left,
|
|
56
|
+
top,
|
|
57
|
+
cropped.canvas.width,
|
|
58
|
+
cropped.canvas.height,
|
|
59
|
+
0,
|
|
60
|
+
0,
|
|
61
|
+
cropped.canvas.width,
|
|
62
|
+
cropped.canvas.height
|
|
63
|
+
);
|
|
64
|
+
return cropped.canvas;
|
|
65
|
+
}
|
|
66
|
+
function draw({ canvas, source, pose, fit }) {
|
|
67
|
+
const { context, width, height } = canvas;
|
|
68
|
+
const side = Math.min(width, height);
|
|
69
|
+
const box = fit * side;
|
|
70
|
+
const ratio = box / Math.max(source.width, source.height);
|
|
71
|
+
const sourceWidth = source.width * ratio;
|
|
72
|
+
const sourceHeight = source.height * ratio;
|
|
73
|
+
const centerX = width / 2 + (pose.x ?? 0) * side;
|
|
74
|
+
const centerY = height / 2 + (pose.y ?? 0) * side;
|
|
75
|
+
const [pivotX, pivotY] = pose.pivot ?? [0.5, 0.5];
|
|
76
|
+
const originX = centerX + (pivotX - 0.5) * sourceWidth;
|
|
77
|
+
const originY = centerY + (pivotY - 0.5) * sourceHeight;
|
|
78
|
+
const left = centerX - sourceWidth / 2;
|
|
79
|
+
const top = centerY - sourceHeight / 2;
|
|
80
|
+
context.setTransform(1, 0, 0, 1, 0, 0);
|
|
81
|
+
context.clearRect(0, 0, width, height);
|
|
82
|
+
context.translate(originX, originY);
|
|
83
|
+
context.rotate((pose.rotate ?? 0) * Math.PI / 180);
|
|
84
|
+
context.transform(1, 0, pose.skew ?? 0, 1, 0, 0);
|
|
85
|
+
context.scale(pose.scaleX ?? pose.scale ?? 1, pose.scaleY ?? pose.scale ?? 1);
|
|
86
|
+
context.translate(-originX, -originY);
|
|
87
|
+
if (!pose.ripple) {
|
|
88
|
+
context.drawImage(source, left, top, sourceWidth, sourceHeight);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const strips = Math.max(1, Math.round(sourceWidth / 10));
|
|
92
|
+
for (let strip = 0; strip < strips; strip++) {
|
|
93
|
+
const offset = pose.ripple.amplitude * box * Math.sin(Math.PI * 2 * (strip / strips - pose.ripple.phase));
|
|
94
|
+
context.drawImage(
|
|
95
|
+
source,
|
|
96
|
+
strip / strips * source.width,
|
|
97
|
+
0,
|
|
98
|
+
source.width / strips + 1,
|
|
99
|
+
source.height,
|
|
100
|
+
left + strip / strips * sourceWidth,
|
|
101
|
+
top + offset,
|
|
102
|
+
sourceWidth / strips + 1,
|
|
103
|
+
sourceHeight
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function sample({
|
|
108
|
+
canvas,
|
|
109
|
+
cols,
|
|
110
|
+
rows,
|
|
111
|
+
threshold
|
|
112
|
+
}) {
|
|
113
|
+
const { context, width, height } = canvas;
|
|
114
|
+
const { data } = context.getImageData(0, 0, width, height);
|
|
115
|
+
return Array.from({ length: cols * rows }, (_, index) => {
|
|
116
|
+
const startX = index % cols * cellSize;
|
|
117
|
+
const startY = Math.floor(index / cols) * cellSize;
|
|
118
|
+
const total = [0, 0, 0];
|
|
119
|
+
let alpha = 0;
|
|
120
|
+
for (let y = startY; y < startY + cellSize; y++) {
|
|
121
|
+
for (let x = startX; x < startX + cellSize; x++) {
|
|
122
|
+
const offset = (y * width + x) * 4;
|
|
123
|
+
const weight = data[offset + 3] ?? 0;
|
|
124
|
+
alpha += weight;
|
|
125
|
+
total[0] += (data[offset] ?? 0) * weight;
|
|
126
|
+
total[1] += (data[offset + 1] ?? 0) * weight;
|
|
127
|
+
total[2] += (data[offset + 2] ?? 0) * weight;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (alpha / (cellSize * cellSize * 255) < threshold) {
|
|
131
|
+
return void 0;
|
|
132
|
+
}
|
|
133
|
+
return [total[0] / alpha, total[1] / alpha, total[2] / alpha];
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function distance({ from, to }) {
|
|
137
|
+
return (from[0] - to[0]) ** 2 + (from[1] - to[1]) ** 2 + (from[2] - to[2]) ** 2;
|
|
138
|
+
}
|
|
139
|
+
function nearest({ color, centroids }) {
|
|
140
|
+
let best = 0;
|
|
141
|
+
let bestDistance = Infinity;
|
|
142
|
+
centroids.forEach((centroid, index) => {
|
|
143
|
+
const gap = distance({ from: centroid, to: color });
|
|
144
|
+
if (gap < bestDistance) {
|
|
145
|
+
best = index;
|
|
146
|
+
bestDistance = gap;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
return best;
|
|
150
|
+
}
|
|
151
|
+
function quantize({ colors, count }) {
|
|
152
|
+
const centroids = colors.slice(0, 1);
|
|
153
|
+
while (centroids.length > 0 && centroids.length < count) {
|
|
154
|
+
let farthest;
|
|
155
|
+
let gap = 0;
|
|
156
|
+
for (const color of colors) {
|
|
157
|
+
const closest = Math.min(
|
|
158
|
+
...centroids.map((centroid) => distance({ from: centroid, to: color }))
|
|
159
|
+
);
|
|
160
|
+
if (closest > gap) {
|
|
161
|
+
gap = closest;
|
|
162
|
+
farthest = color;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (!farthest || gap === 0) {
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
centroids.push(farthest);
|
|
169
|
+
}
|
|
170
|
+
for (let round = 0; round < 8; round++) {
|
|
171
|
+
const sums = centroids.map(() => ({
|
|
172
|
+
total: [0, 0, 0],
|
|
173
|
+
count: 0
|
|
174
|
+
}));
|
|
175
|
+
for (const color of colors) {
|
|
176
|
+
const sum = sums[nearest({ color, centroids })];
|
|
177
|
+
if (sum) {
|
|
178
|
+
sum.total[0] += color[0];
|
|
179
|
+
sum.total[1] += color[1];
|
|
180
|
+
sum.total[2] += color[2];
|
|
181
|
+
sum.count++;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
sums.forEach(({ total, count: count2 }, index) => {
|
|
185
|
+
if (count2 > 0) {
|
|
186
|
+
centroids[index] = [
|
|
187
|
+
total[0] / count2,
|
|
188
|
+
total[1] / count2,
|
|
189
|
+
total[2] / count2
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return centroids;
|
|
195
|
+
}
|
|
196
|
+
function toHex(color) {
|
|
197
|
+
const channels = color.map(
|
|
198
|
+
(channel) => Math.round(channel).toString(16).padStart(2, "0")
|
|
199
|
+
);
|
|
200
|
+
return `#${channels.join("")}`;
|
|
201
|
+
}
|
|
202
|
+
function toFrame(dots) {
|
|
203
|
+
const layers = Array.from(
|
|
204
|
+
{ length: Math.max(0, ...dots) },
|
|
205
|
+
() => []
|
|
206
|
+
);
|
|
207
|
+
dots.forEach((layer, index) => {
|
|
208
|
+
layers[layer - 1]?.push(index);
|
|
209
|
+
});
|
|
210
|
+
return layers;
|
|
211
|
+
}
|
|
212
|
+
export function animateEmoji({
|
|
213
|
+
emoji,
|
|
214
|
+
cols,
|
|
215
|
+
rows,
|
|
216
|
+
colors: colorCount,
|
|
217
|
+
threshold
|
|
218
|
+
}) {
|
|
219
|
+
const { name, heading, tint } = pickMotion(emoji);
|
|
220
|
+
const motion = motions[name];
|
|
221
|
+
const empty = {
|
|
222
|
+
motion: name,
|
|
223
|
+
interval: motion.interval,
|
|
224
|
+
sequence: [],
|
|
225
|
+
colors: []
|
|
226
|
+
};
|
|
227
|
+
const source = emoji ? renderSource(emoji) : void 0;
|
|
228
|
+
const context = createContext(cols * cellSize, rows * cellSize);
|
|
229
|
+
if (!source || !context) {
|
|
230
|
+
return empty;
|
|
231
|
+
}
|
|
232
|
+
const canvas = { context, width: cols * cellSize, height: rows * cellSize };
|
|
233
|
+
const sampled = Array.from({ length: motion.frames }, (_, index) => {
|
|
234
|
+
const progress = index / motion.frames;
|
|
235
|
+
draw({
|
|
236
|
+
canvas,
|
|
237
|
+
source,
|
|
238
|
+
pose: motion.pose({ progress, index, heading, tint }),
|
|
239
|
+
fit: motion.fit
|
|
240
|
+
});
|
|
241
|
+
return sample({ canvas, cols, rows, threshold });
|
|
242
|
+
});
|
|
243
|
+
const lit = sampled.flat().filter((color) => color !== void 0);
|
|
244
|
+
const centroids = quantize({ colors: lit, count: colorCount });
|
|
245
|
+
const counts = centroids.map(() => 0);
|
|
246
|
+
lit.forEach((color) => {
|
|
247
|
+
const index = nearest({ color, centroids });
|
|
248
|
+
counts[index] = (counts[index] ?? 0) + 1;
|
|
249
|
+
});
|
|
250
|
+
const order = centroids.map((_, index) => index).sort((first, second) => (counts[second] ?? 0) - (counts[first] ?? 0));
|
|
251
|
+
const palette = order.flatMap((index) => {
|
|
252
|
+
const centroid = centroids[index];
|
|
253
|
+
return centroid ? [toHex(centroid)] : [];
|
|
254
|
+
});
|
|
255
|
+
const extras = /* @__PURE__ */ new Map();
|
|
256
|
+
function extraLayer(color) {
|
|
257
|
+
const layer = extras.get(color) ?? palette.length + extras.size + 1;
|
|
258
|
+
extras.set(color, layer);
|
|
259
|
+
return layer;
|
|
260
|
+
}
|
|
261
|
+
const sequence = sampled.map((cells, index) => {
|
|
262
|
+
const progress = index / motion.frames;
|
|
263
|
+
const dots = cells.map(
|
|
264
|
+
(color) => color ? order.indexOf(nearest({ color, centroids })) + 1 : 0
|
|
265
|
+
);
|
|
266
|
+
const particles = motion.particles?.({ progress, index, heading, tint }) ?? [];
|
|
267
|
+
particles.forEach((particle) => {
|
|
268
|
+
const col = Math.round(particle.x * cols - 0.5);
|
|
269
|
+
const row = Math.round(particle.y * rows - 0.5);
|
|
270
|
+
const dot = row * cols + col;
|
|
271
|
+
if (col >= 0 && row >= 0 && col < cols && row < rows && !dots[dot]) {
|
|
272
|
+
dots[dot] = extraLayer(particle.color);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
if (motion.shine) {
|
|
276
|
+
const [from, to] = motion.shine;
|
|
277
|
+
const sweep = (progress - from) / (to - from);
|
|
278
|
+
if (sweep >= 0 && sweep <= 1) {
|
|
279
|
+
const diagonal = sweep * (cols + rows + 1) - 2;
|
|
280
|
+
dots.forEach((layer, dot) => {
|
|
281
|
+
const offset = dot % cols + Math.floor(dot / cols) - diagonal;
|
|
282
|
+
if (layer && offset >= 0 && offset <= 1.5) {
|
|
283
|
+
dots[dot] = extraLayer("#fff");
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return toFrame(dots);
|
|
289
|
+
});
|
|
290
|
+
return {
|
|
291
|
+
motion: name,
|
|
292
|
+
interval: motion.interval,
|
|
293
|
+
sequence,
|
|
294
|
+
colors: [...palette, ...extras.keys()]
|
|
295
|
+
};
|
|
296
|
+
}
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
export type EmojiPose = {
|
|
2
|
+
x?: number;
|
|
3
|
+
y?: number;
|
|
4
|
+
rotate?: number;
|
|
5
|
+
scale?: number;
|
|
6
|
+
scaleX?: number;
|
|
7
|
+
scaleY?: number;
|
|
8
|
+
skew?: number;
|
|
9
|
+
pivot?: [x: number, y: number];
|
|
10
|
+
ripple?: {
|
|
11
|
+
amplitude: number;
|
|
12
|
+
phase: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type EmojiParticle = {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
color: string;
|
|
19
|
+
};
|
|
20
|
+
export type EmojiMotionContext = {
|
|
21
|
+
progress: number;
|
|
22
|
+
index: number;
|
|
23
|
+
heading: number;
|
|
24
|
+
tint: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
export type EmojiMotion = {
|
|
27
|
+
frames: number;
|
|
28
|
+
interval: number;
|
|
29
|
+
fit: number;
|
|
30
|
+
shine?: [from: number, to: number];
|
|
31
|
+
pose: (context: EmojiMotionContext) => EmojiPose;
|
|
32
|
+
particles?: (context: EmojiMotionContext) => Array<EmojiParticle>;
|
|
33
|
+
};
|
|
34
|
+
export declare const motions: {
|
|
35
|
+
beat: {
|
|
36
|
+
frames: number;
|
|
37
|
+
interval: number;
|
|
38
|
+
fit: number;
|
|
39
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
40
|
+
scale: number;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
flicker: {
|
|
44
|
+
frames: number;
|
|
45
|
+
interval: number;
|
|
46
|
+
fit: number;
|
|
47
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
48
|
+
pivot: [number, number];
|
|
49
|
+
scaleY: number;
|
|
50
|
+
skew: number;
|
|
51
|
+
};
|
|
52
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
color: string;
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
58
|
+
swing: {
|
|
59
|
+
frames: number;
|
|
60
|
+
interval: number;
|
|
61
|
+
fit: number;
|
|
62
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
63
|
+
pivot: [number, number];
|
|
64
|
+
rotate: number;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
wave: {
|
|
68
|
+
frames: number;
|
|
69
|
+
interval: number;
|
|
70
|
+
fit: number;
|
|
71
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
72
|
+
pivot: [number, number];
|
|
73
|
+
y: number;
|
|
74
|
+
rotate: number;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
fly: {
|
|
78
|
+
frames: number;
|
|
79
|
+
interval: number;
|
|
80
|
+
fit: number;
|
|
81
|
+
pose: ({ progress, heading }: EmojiMotionContext) => {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
};
|
|
85
|
+
particles: ({ progress, heading }: EmojiMotionContext) => {
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
color: string;
|
|
89
|
+
}[];
|
|
90
|
+
};
|
|
91
|
+
drive: {
|
|
92
|
+
frames: number;
|
|
93
|
+
interval: number;
|
|
94
|
+
fit: number;
|
|
95
|
+
pose: ({ index }: EmojiMotionContext) => {
|
|
96
|
+
y: number;
|
|
97
|
+
};
|
|
98
|
+
particles: ({ progress, heading }: EmojiMotionContext) => {
|
|
99
|
+
x: number;
|
|
100
|
+
y: number;
|
|
101
|
+
color: string;
|
|
102
|
+
}[];
|
|
103
|
+
};
|
|
104
|
+
bounce: {
|
|
105
|
+
frames: number;
|
|
106
|
+
interval: number;
|
|
107
|
+
fit: number;
|
|
108
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
109
|
+
pivot: [number, number];
|
|
110
|
+
y: number;
|
|
111
|
+
scaleX: number;
|
|
112
|
+
scaleY: number;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
hop: {
|
|
116
|
+
frames: number;
|
|
117
|
+
interval: number;
|
|
118
|
+
fit: number;
|
|
119
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
120
|
+
pivot: [number, number];
|
|
121
|
+
y: number;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
spin: {
|
|
125
|
+
frames: number;
|
|
126
|
+
interval: number;
|
|
127
|
+
fit: number;
|
|
128
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
129
|
+
rotate: number;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
flip: {
|
|
133
|
+
frames: number;
|
|
134
|
+
interval: number;
|
|
135
|
+
fit: number;
|
|
136
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
137
|
+
scaleX: number;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
float: {
|
|
141
|
+
frames: number;
|
|
142
|
+
interval: number;
|
|
143
|
+
fit: number;
|
|
144
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
145
|
+
y: number;
|
|
146
|
+
rotate: number;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
twinkle: {
|
|
150
|
+
frames: number;
|
|
151
|
+
interval: number;
|
|
152
|
+
fit: number;
|
|
153
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
154
|
+
scale: number;
|
|
155
|
+
};
|
|
156
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
157
|
+
x: number;
|
|
158
|
+
y: number;
|
|
159
|
+
color: string;
|
|
160
|
+
}[];
|
|
161
|
+
};
|
|
162
|
+
shake: {
|
|
163
|
+
frames: number;
|
|
164
|
+
interval: number;
|
|
165
|
+
fit: number;
|
|
166
|
+
pose: ({ progress, index }: EmojiMotionContext) => {
|
|
167
|
+
x: number;
|
|
168
|
+
rotate: number;
|
|
169
|
+
} | {
|
|
170
|
+
x?: undefined;
|
|
171
|
+
rotate?: undefined;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
rain: {
|
|
175
|
+
frames: number;
|
|
176
|
+
interval: number;
|
|
177
|
+
fit: number;
|
|
178
|
+
pose: () => {
|
|
179
|
+
y: number;
|
|
180
|
+
};
|
|
181
|
+
particles: ({ progress, tint }: EmojiMotionContext) => {
|
|
182
|
+
x: number;
|
|
183
|
+
y: number;
|
|
184
|
+
color: string;
|
|
185
|
+
}[];
|
|
186
|
+
};
|
|
187
|
+
snow: {
|
|
188
|
+
frames: number;
|
|
189
|
+
interval: number;
|
|
190
|
+
fit: number;
|
|
191
|
+
pose: () => {
|
|
192
|
+
y: number;
|
|
193
|
+
};
|
|
194
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
195
|
+
x: number;
|
|
196
|
+
y: number;
|
|
197
|
+
color: string;
|
|
198
|
+
}[];
|
|
199
|
+
};
|
|
200
|
+
sleep: {
|
|
201
|
+
frames: number;
|
|
202
|
+
interval: number;
|
|
203
|
+
fit: number;
|
|
204
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
205
|
+
x: number;
|
|
206
|
+
y: number;
|
|
207
|
+
};
|
|
208
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
209
|
+
x: number;
|
|
210
|
+
y: number;
|
|
211
|
+
color: string;
|
|
212
|
+
}[];
|
|
213
|
+
};
|
|
214
|
+
rock: {
|
|
215
|
+
frames: number;
|
|
216
|
+
interval: number;
|
|
217
|
+
fit: number;
|
|
218
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
219
|
+
pivot: [number, number];
|
|
220
|
+
rotate: number;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
burst: {
|
|
224
|
+
frames: number;
|
|
225
|
+
interval: number;
|
|
226
|
+
fit: number;
|
|
227
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
228
|
+
scale: number;
|
|
229
|
+
};
|
|
230
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
231
|
+
x: number;
|
|
232
|
+
y: number;
|
|
233
|
+
color: string;
|
|
234
|
+
}[];
|
|
235
|
+
};
|
|
236
|
+
stamp: {
|
|
237
|
+
frames: number;
|
|
238
|
+
interval: number;
|
|
239
|
+
fit: number;
|
|
240
|
+
shine: [number, number];
|
|
241
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
242
|
+
scale: number;
|
|
243
|
+
} | {
|
|
244
|
+
scale?: undefined;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
gleam: {
|
|
248
|
+
frames: number;
|
|
249
|
+
interval: number;
|
|
250
|
+
fit: number;
|
|
251
|
+
shine: [number, number];
|
|
252
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
253
|
+
y: number;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
flag: {
|
|
257
|
+
frames: number;
|
|
258
|
+
interval: number;
|
|
259
|
+
fit: number;
|
|
260
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
261
|
+
ripple: {
|
|
262
|
+
amplitude: number;
|
|
263
|
+
phase: number;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
sway: {
|
|
268
|
+
frames: number;
|
|
269
|
+
interval: number;
|
|
270
|
+
fit: number;
|
|
271
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
272
|
+
pivot: [number, number];
|
|
273
|
+
rotate: number;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
love: {
|
|
277
|
+
frames: number;
|
|
278
|
+
interval: number;
|
|
279
|
+
fit: number;
|
|
280
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
281
|
+
y: number;
|
|
282
|
+
};
|
|
283
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
284
|
+
x: number;
|
|
285
|
+
y: number;
|
|
286
|
+
color: string;
|
|
287
|
+
}[];
|
|
288
|
+
};
|
|
289
|
+
steam: {
|
|
290
|
+
frames: number;
|
|
291
|
+
interval: number;
|
|
292
|
+
fit: number;
|
|
293
|
+
pose: () => {
|
|
294
|
+
y: number;
|
|
295
|
+
};
|
|
296
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
297
|
+
x: number;
|
|
298
|
+
y: number;
|
|
299
|
+
color: string;
|
|
300
|
+
}[];
|
|
301
|
+
};
|
|
302
|
+
look: {
|
|
303
|
+
frames: number;
|
|
304
|
+
interval: number;
|
|
305
|
+
fit: number;
|
|
306
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
307
|
+
x: number;
|
|
308
|
+
} | {
|
|
309
|
+
x?: undefined;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
nod: {
|
|
313
|
+
frames: number;
|
|
314
|
+
interval: number;
|
|
315
|
+
fit: number;
|
|
316
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
317
|
+
y: number;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
tilt: {
|
|
321
|
+
frames: number;
|
|
322
|
+
interval: number;
|
|
323
|
+
fit: number;
|
|
324
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
325
|
+
pivot: [number, number];
|
|
326
|
+
x: number;
|
|
327
|
+
rotate: number;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
swim: {
|
|
331
|
+
frames: number;
|
|
332
|
+
interval: number;
|
|
333
|
+
fit: number;
|
|
334
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
335
|
+
x: number;
|
|
336
|
+
y: number;
|
|
337
|
+
rotate: number;
|
|
338
|
+
};
|
|
339
|
+
particles: ({ progress }: EmojiMotionContext) => {
|
|
340
|
+
x: number;
|
|
341
|
+
y: number;
|
|
342
|
+
color: string;
|
|
343
|
+
}[];
|
|
344
|
+
};
|
|
345
|
+
flap: {
|
|
346
|
+
frames: number;
|
|
347
|
+
interval: number;
|
|
348
|
+
fit: number;
|
|
349
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
350
|
+
scaleX: number;
|
|
351
|
+
y: number;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
clap: {
|
|
355
|
+
frames: number;
|
|
356
|
+
interval: number;
|
|
357
|
+
fit: number;
|
|
358
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
359
|
+
scaleX: number;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
bob: {
|
|
363
|
+
frames: number;
|
|
364
|
+
interval: number;
|
|
365
|
+
fit: number;
|
|
366
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
367
|
+
y: number;
|
|
368
|
+
rotate: number;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
pop: {
|
|
372
|
+
frames: number;
|
|
373
|
+
interval: number;
|
|
374
|
+
fit: number;
|
|
375
|
+
shine: [number, number];
|
|
376
|
+
pose: ({ progress }: EmojiMotionContext) => {
|
|
377
|
+
scale: number;
|
|
378
|
+
} | {
|
|
379
|
+
scale?: undefined;
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
};
|