JYT-copy/dsh-minecraft-ui ↗★ 1

dsh-minecraft-ui

Minecraft-style theme for the dsh web GUI: blocky pixel components, photo wallpapers with local upload, bundled Minecraft UI sound samples (with synthesized fallback), and local BGM with a crossfading playlist 适合喜欢像素风格、想要为对话界面增添游戏音效与动态壁纸的用户。

パッケージ
dsh-minecraft-ui
互換性
未検証
バージョン
1.0.1
ライセンス
MIT
最終更新
2026/10/21

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JYT-copy/dsh-minecraft-ui

ドキュメント

README 全文を読む ↗

4. 配置默认值

{
  enabled: true,
  wallpaper: { auto: true, intervalSec: 300, sceneId: 'photo-cozy-cabin', dim: 0, gain: 1.18, blur: 0 },
  sfx:       { enabled: true, volume: 0.55 },
  bgm:       { enabled: false, volume: 0.22, trackId: '' },
  ui:        { glass: 0.5, achievements: true, hudHidden: false, hudDrop: 28 }
}

存在 localStorage(键 dsh-minecraft-ui:options,带 __v 版本号);数值在读取与写入时都会被夹到合法区间, 手改 localStorage 也不会把界面弄坏。

控制台 API

页面里始终挂着 window.MinecraftUI(主题关闭时也在,便于排查):

MinecraftUI.options()                      // 当前全部配置
MinecraftUI.set({ wallpaper: { gain: 1.3, dim: 0 } })
MinecraftUI.reset()
MinecraftUI.listWallpapers()               // [{ id, name, kind }](我的 + 目录)
MinecraftUI.listUserWallpapers()           // 只有上传的
MinecraftUI.setWallpaper('photo-cozy-cabin')
MinecraftUI.nextWallpaper()
MinecraftUI.deleteWallpaper('user-xxxx')
MinecraftUI.refreshUserWallpapers()
MinecraftUI.listBgmTracks()                // [{ id, name, source: 'file' | 'user' }]
MinecraftUI.listUserMusic()                // 只有上传的音乐
MinecraftUI.setBgmTrack('')
MinecraftUI.nextBgmTrack()
MinecraftUI.refreshUserMusic()
MinecraftUI.deleteUserMusic('user-music-xxxx')
MinecraftUI.toggleTheme()
MinecraftUI.showHud(false)                 // 隐藏控制台;true 恢复
MinecraftUI.setHudDrop(28)                 // 控制台底距(px)
MinecraftUI.audio                          // 直接拿音频引擎