JingkaiTang/dsh-client-ui-slingshot ↗★ 0
@t7kai/dsh-client-ui-slingshot
A playful slingshot toy for the dsh web GUI: drag to aim, fire a stone, shatter UI elements and watch them tumble off screen — then pop back, good as new.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗弹弓玩具 · dsh slingshot toy 🪀

A playful, purely-visual toy for the dsh web GUI. A wooden slingshot lives in the bottom-right corner of the page (drag it anywhere!):
- 拖拽瞄准 — press and hold the leather pouch, drag it backwards (Angry-Birds style). A dotted arc previews where the stone will fly.
- 松手发射 — release to fire the stone.
- 打碎元素 — the stone shatters the first UI element it hits: the element is cloned into shards that burst apart, and the whole wreckage tumbles off the screen under gravity.
- 自动恢复 — once it has fallen out of the viewport, the original element
pops back with a small animation. Nothing in the GUI is ever permanently
damaged —
html/bodyand the toy itself are never targeted, and the layout is preserved the whole time (the original is onlyvisibility:hiddenwhile its clone flies).
Extra features:
- 🪵 手柄拖动 — the slingshot has a leather grip handle at the bottom of
the trunk (orange-brown, with grip ridges and a grab cursor). Press and drag
it to move the slingshot anywhere on the screen (clamped to the viewport) —
no mode toggles. The position is persisted in
localStorageand restored after reload; the collapsed launcher button follows the gun. - 🔊/🔇 sound toggle — WebAudio-synthesized boings, crashes and pops (no
assets), muted and state persisted in
localStorage. - 💥 score counter (persisted).
- Collapsible widget: ✕ hides it into a small launcher button that pulses and shows a "where did it go" tip.
- The client bundle is part of the dsh client HMR chain: edit
lib/client.jsand the running page hot-swaps the plugin without a refresh.
安装(给使用者)
DSH 0811 起不再有官方 repository 插件机制,客户端插件统一挂进 web profile:
-
把本包放进 profile 的模块解析路径(二选一):
- 直接把
dsh-client-ui-slingshot目录复制/软链到~/.dsh/profiles/node_modules/@t7kai/下,或 - 用 plugin-registry 控制台 git 源安装:
dsh plugin --profile web add "github:/dsh-client-ui-slingshot#main"
- 直接把
-
在
~/.dsh/profiles/web/cordis.patch.yml注册一行(配置层 HMR 热生效,无需重启):- insert: - id: ui-slingshot name: '@t7kai/dsh-client-ui-slingshot'