@mingxy/opencode-mascot 0.7.3 → 0.7.4
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
|
@@ -74,6 +74,21 @@ export function HomeMascot(props: HomeMascotProps): JSX.Element {
|
|
|
74
74
|
renderers[currentName()].setCharacterHidden(true);
|
|
75
75
|
renderers[currentName()].setProp(getProp("box") ?? null);
|
|
76
76
|
|
|
77
|
+
const finalY = curY;
|
|
78
|
+
curY = finalY - 15;
|
|
79
|
+
applyPos();
|
|
80
|
+
let fallStep = 0;
|
|
81
|
+
const fallInterval = setInterval(() => {
|
|
82
|
+
fallStep++;
|
|
83
|
+
curY = finalY - 15 + fallStep;
|
|
84
|
+
applyPos();
|
|
85
|
+
if (fallStep >= 15) {
|
|
86
|
+
clearInterval(fallInterval);
|
|
87
|
+
curY = finalY;
|
|
88
|
+
applyPos();
|
|
89
|
+
}
|
|
90
|
+
}, 30);
|
|
91
|
+
|
|
77
92
|
setTimeout(() => {
|
|
78
93
|
renderers[currentName()].setProp(null);
|
|
79
94
|
renderers[currentName()].setCharacterHidden(false);
|
|
@@ -220,6 +220,18 @@ 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);
|