Skip to content

Commit

Permalink
fix: 修复休息时还会提示闲置消息的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hacxy committed Mar 6, 2024
1 parent 9bbb6b0 commit fbee2a9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions packages/oh-my-live2d/src/modules/index.ts
Expand Up @@ -146,8 +146,11 @@ export class OhMyLive2D {
this.statusBar.popup('休息中', SystemState.info, false, () => {
void this.stage.slideIn(this.options.transitionTime);
this.statusBar.popup('闪亮登场');
void this.tips.idlePlayer?.start();
});

this.tips.clear();

return;
// 切换模型
case 'SwitchModel':
Expand Down
2 changes: 1 addition & 1 deletion packages/oh-my-live2d/src/modules/tips.ts
Expand Up @@ -8,7 +8,7 @@ import { createElement, getWelcomeMessage, getWordTheDay, setStyleForElement, sl
export class Tips {
private element: HTMLElement;
// private status: Status = Status.Hidden;
private idlePlayer?: IdleTimer;
idlePlayer?: IdleTimer;

private closeTimer = 0;
private transitionTime = 1000; // 默认的消息过渡动画持续时长
Expand Down
6 changes: 3 additions & 3 deletions tests/vite-app/public/index.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tests/vite-app/src/main.ts
Expand Up @@ -13,10 +13,10 @@ void loadOml2d({
// path: '/models/mikoto/model.json',
// scale: 0.1
// },
{
path: '/models/sat8_2601/model.json',
scale: 0.1
},
// {
// path: '/models/sat8_2601/model.json',
// scale: 0.1
// },
{
path: 'https://cdn.jsdelivr.net/gh/Eikanya/Live2d-model/Live2D/Senko_Normals/senko.model3.json',
scale: 0.12,
Expand Down

0 comments on commit fbee2a9

Please sign in to comment.