A 3D eight-ball pool table opened from a DSH session: a 9ft tournament bed with three-stage friction physics so draw, follow and side spin are computed rather than scripted, WPA rules against an AI opponent, and fully procedural art and Web Audio sound.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:lizzkkafei/my-projects#path:/desktop-pool-plugin
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
一个以 DSH Web UI 插件 形式发行的三维美式 8 球台球桌:从任意会话的输入框左侧点「台球」进入全屏球台;点右上角「返回会话」或按 ⌥P 回到对话。

玩法
- 9ft 比赛台:2.54 × 1.27 m 标准台面、Ø57.15 mm 用球、六袋口按真实尺寸建模
- 真实杆法:低杆回拉、高杆跟进、左右塞吃库变线——都是三段式摩擦模型算出来的,不是预先写死的动画
- WPA 规则:开球、分组(全色 1-7 / 花色 9-15)、犯规判定、手中球、8 号球胜负
- AI 对手:枚举「目标球 × 袋口」的可行击球并评分,带难度误差,会做走位
- 全程序化音效:撞球、吃库、落袋、皮头、犯规、胜负全部用 Web Audio 实时合成,没有任何音频文件
- 胜利礼花:打进 8 号时满屏礼花与奖杯
操作
| 操作 | 说明 |
|---|---|
| 在台面上按住拖动 | 旋转瞄准(可转到任意角度) |
按住 Space |
蓄力,松开击球 |
| 单击台面 | 以当前力度直接击球 |
| 滚轮 | 微调力度 |
← → / A D |
瞄准粗调 0.10° |
Shift + ← → |
瞄准细调 0.01° |
, . |
超精调 0.001° |
| 拖动左下角白球 | 杆法(高杆 / 低杆 / 左右塞) |
| 点击台面 | 摆放母球(手中球时) |
T / 右键 |
切换俯视视角 |
G |
辅助线开关 |
R |
重开一局 |
F / Esc |
规则与操作说明 |
⌥P |
在会话里随时打开 / 收起球台 |
安装
市场收录后可在 设置 → 插件 → 插件市场 搜索 zhizhen-pool 一键安装;也可以从源码装:
dsh plugin --profile <profile> add github:lizzkkafei/my-projects#path:/desktop-pool-plugin
装完刷新 DSH 页面(⌘R)即可在会话输入框左侧看到「台球」按钮。
实现
- 单文件 Client bundle(
client.js,由scripts/build.mjs生成),通过conversation.input.left注册入口、shell.overlay注册全屏球台 - 游戏本体跑在 shadow root 里:样式和元素 id 不会污染 DSH 界面
- 关闭覆盖层时会回收:所有
requestAnimationFrame、窗口监听器、AudioContext - 物理常数取自
pooltool与tailuge/billiards的实测值(Han 2005 / Mathavan 2007 碰撞模型)
自检
node scripts/check.mjs # 包结构检查(插件管理器与市场 CI 看的东西)
cd game && node selftest.mjs # 26 项物理/规则断言
cd game && node gametest.mjs 10 # 10 局 AI 自动对战
Links
More in this category
PC2005-cloud/dsh-pet#dsh-pet★ 6367
Desktop pet for the DSH Web UI on Windows, macOS and Linux: 106 transparent animations in the browser overlay or a transparent always-on-top desktop window, throw-and-bounce drag physics with squash and particle scoring, a work-status bubble driven by live session events, self-talk and chat with persistent memory, balance display, meme-image bubbles, multiple pets on screen, and drop-in custom animations and pet packs.
flizzywine/dsh-tavern#dsh-tavern★ 1636
An agent-powered tavern for DeepSeek Harness with SillyTavern compatibility, character card imports, support for multiple models, and mobile play. Install the tavern from Settings → Tavern Launcher on desktop. A launcher derived from 2NF/dsh-profile-bridge (MIT): it downloads the tavern into a separate DSH profile and switches profiles on restart. Install this launcher or the upstream plugin, not both — they claim the same /profile-bridge channel.
Alterssss/dsh-bili-whale★ 1062
A Bilibili companion that keeps its own schedule. A 60-second tick in the plugin host wakes a dedicated agent session at a random moment inside the configured time windows (opting out of a day is a configurable chance), then hands it a bundled CLI of 38 subcommands — feed, subtitles, danmaku, comments, ffmpeg frame grabs, and two diaries. Shares at most N items a day by commenting on them and @-mentioning the owner (default 3, enforced from a written quota log, and it stops on rate-limit or captcha signals). Also polls comment replies, direct messages and live-room danmaku; replies to anyone but the owner are queued for approval in Settings. Settings → 养鱼 writes ~/.dsh/bili-whale.config.json; cookies live separately in ~/.bili-ai/credentials.json and are never echoed back. The HTTP routes are loopback-only behind DSH's trust fence. Needs Node 18+ and ffmpeg on PATH for frame extraction.
Nagi-ovo/dsh-ads★ 728
Parody ads in 2005-Chinese-web style: sidebar banners, in-chat feeds, corner popups, and a close button whose hit area is smaller than it looks. All fictional.
yyh-001/dsh-meme★ 581
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
vlln/whale-girl★ 409
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.