dsh-pixel-icons
开发工具 活跃维护

dsh-pixel-icons

TableRogue/dsh-pixel-icons

可批量将GUI界面的矢量SVG图标转为复古像素风格,支持自定义像素精度,保留原始图标核心辨识度,转换结果可直接适配低分辨率显示场景的界面开发,无需手动逐像素调整。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
10 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:TableRogue/dsh-pixel-icons
git clone https://github.com/TableRogue/dsh-pixel-icons.git
git clone git@github.com:TableRogue/dsh-pixel-icons.git
README.md main

dsh-pixel-icons

把 DeepSeek Harness Web GUI 中的矢量 SVG 图标转为像素风(1px 像素块)的插件。

用处

  • 运行时把全部图标(fill="currentColor" 的 SVG)光栅化并重建为 1px 像素块,与 Fusion Pixel 像素字体风格统一。
  • 超采样(3×)+ 块平均判定,细线连续、粗细均匀。
  • 只处理图标:上下文进度环等功能性 SVG(无 currentColor)自动跳过,不破坏功能。
  • 原地修改保留原节点 identity,不破坏 React 协调(侧栏折叠/展开正常)。

安装(每次启动自动加载)

# 本地 checkout
dsh plugin --profile web add ./dsh-pixel-icons

# 或从 GitHub(纯 JS,无构建步骤)
dsh plugin --profile web add github:TableRogue/dsh-pixel-icons

建议搭配 dsh-fusion-pixel-font 与 dsh-fusion-pixel-ui-adapt 使用。安装后自动追加进 profile 的 dsh.profile.bundles,启动 dsh --profile web 即生效。验证 / 卸载:

dsh --profile web --dump-config        # 应看到 # == dsh-pixel-icons 层
dsh plugin --profile web remove dsh-pixel-icons

临时方式(动态插件,单次进程):把 src/client.js 头注释以下的内容填入 cordis_define 的 code.client 并 cordis_run,详见文件头注释。

配置

  • SCALE:超采样倍数(默认 3),改小像素颗粒更大、改大线条更精细。
  • 0.35:块平均覆盖率阈值,细线跨块更易命中。
  • 调参后需刷新页面重新光栅化。

文件

  • index.js — Host 半:空 apply(纯 client 插件)。
  • src/client.js — 动态插件源码(文档参考)。
  • lib/client.js — 发布 bundle(client-modules 加载)。
  • cordis.patch.yml — profile 组合补丁行。

License

MIT © 2026 TableRogue