@mingxy/opencode-mascot 0.7.3 → 0.7.5
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/package.json
CHANGED
|
@@ -68,16 +68,29 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
onScatter(() => {
|
|
71
|
-
renderers[currentName()].scatterIn();
|
|
72
71
|
});
|
|
73
72
|
|
|
74
73
|
renderers[currentName()].setCharacterHidden(true);
|
|
75
74
|
renderers[currentName()].setProp(getProp("box") ?? null);
|
|
76
75
|
|
|
76
|
+
const finalY = curY;
|
|
77
|
+
curY = finalY - 15;
|
|
78
|
+
applyPos();
|
|
79
|
+
let fallStep = 0;
|
|
80
|
+
const fallInterval = setInterval(() => {
|
|
81
|
+
fallStep++;
|
|
82
|
+
curY = finalY - 15 + fallStep;
|
|
83
|
+
applyPos();
|
|
84
|
+
if (fallStep >= 15) {
|
|
85
|
+
clearInterval(fallInterval);
|
|
86
|
+
curY = finalY;
|
|
87
|
+
applyPos();
|
|
88
|
+
}
|
|
89
|
+
}, 30);
|
|
90
|
+
|
|
77
91
|
setTimeout(() => {
|
|
78
92
|
renderers[currentName()].setProp(null);
|
|
79
93
|
renderers[currentName()].setCharacterHidden(false);
|
|
80
|
-
renderers[currentName()].scatterIn();
|
|
81
94
|
}, 6000);
|
|
82
95
|
|
|
83
96
|
const stopDrag = () => {
|
|
@@ -209,7 +209,7 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
|
|
|
209
209
|
setTimeout(() => setZBoost(false), 3500);
|
|
210
210
|
});
|
|
211
211
|
|
|
212
|
-
let scattered =
|
|
212
|
+
let scattered = true;
|
|
213
213
|
|
|
214
214
|
onScatter(() => {
|
|
215
215
|
if (scattered) return;
|
|
@@ -220,13 +220,21 @@ export function SidebarMascot(props: SidebarMascotProps): JSX.Element {
|
|
|
220
220
|
renderers[currentName()].setCharacterHidden(true);
|
|
221
221
|
renderers[currentName()].setProp(getProp("box") ?? null);
|
|
222
222
|
|
|
223
|
+
const finalY = posY();
|
|
224
|
+
setPosY(finalY - 15);
|
|
225
|
+
let fallStep = 0;
|
|
226
|
+
const fallInterval = setInterval(() => {
|
|
227
|
+
fallStep++;
|
|
228
|
+
setPosY(finalY - 15 + fallStep);
|
|
229
|
+
if (fallStep >= 15) {
|
|
230
|
+
clearInterval(fallInterval);
|
|
231
|
+
setPosY(finalY);
|
|
232
|
+
}
|
|
233
|
+
}, 30);
|
|
234
|
+
|
|
223
235
|
setTimeout(() => {
|
|
224
236
|
renderers[currentName()].setProp(null);
|
|
225
237
|
renderers[currentName()].setCharacterHidden(false);
|
|
226
|
-
if (!scattered) {
|
|
227
|
-
scattered = true;
|
|
228
|
-
renderers[currentName()].scatterIn();
|
|
229
|
-
}
|
|
230
238
|
}, 6000);
|
|
231
239
|
|
|
232
240
|
return (
|