@muxiuesd/dsh-pixel-studio 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +58 -2
- package/client.js +3250 -0
- package/cordis.patch.yml +3 -0
- package/icon.png +0 -0
- package/index.js +620 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +59 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# 更新记录
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
- 新增「打开图片」:把 PNG / JPEG / GIF / WebP / BMP 直接转成像素画,自动缩到 256 以内,可选自动提取配色(中位切分)/ 当前调色板 / PICO-8,可开 Floyd–Steinberg 抖动,导入前先看预览。
|
|
6
|
+
- 「另存为」对话框新增导出倍率(1× / 2× / 3× / 4× / 6× / 8× / 12× / 16×,按单张 PNG 上限自动禁用超出的档位),选择会被记住;普通导出同样使用记住的倍率。
|
|
7
|
+
- 新增「尺寸」:调整画布宽高(1–256),9 宫格锚点决定裁剪或扩边的方向,扩边补透明,支持撤销。
|
|
8
|
+
- 撤销历史现在也记录画布尺寸,尺寸调整和绘制可以一起回退。
|
|
9
|
+
|
|
10
|
+
## 0.1.1
|
|
11
|
+
|
|
12
|
+
- 首个发布版本:三栏编辑器、铅笔 / 橡皮 / 油漆桶 / 吸管、1–8 方形笔刷、整数倍缩放、图层、36 色调色板(改色不动画布)、11 个新建尺寸预设、导出 1× PNG 到会话目录、`Ctrl+S` / `Ctrl+Shift+S`。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Muxiuesd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-pixel-studio
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
在 DeepSeek Harness(DSH)里画像素画:会话页签里一个三栏编辑器,左工具、中画布、右调色板,滚轮缩放、图层、导出 PNG,作品存在本机。
|
|
4
|
+
|
|
5
|
+
## 装法
|
|
6
|
+
|
|
7
|
+
三种都可以,装完刷新页面,会话页签行里会出现“像素画”。
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 1) 官方插件管理页 / 插件市场里搜索 @muxiuesd/dsh-pixel-studio
|
|
11
|
+
# 2) DSH CLI(npm)
|
|
12
|
+
dsh plugin --profile web add @muxiuesd/dsh-pixel-studio
|
|
13
|
+
# 3) 直接从 GitHub 仓库装(仓库根就是插件包)
|
|
14
|
+
dsh plugin --profile web add github:Muxiuesd/dsh-pixel
|
|
15
|
+
# 4) 本地开发
|
|
16
|
+
dsh plugin --profile web add /绝对路径/dsh-pixel
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 能做什么
|
|
20
|
+
|
|
21
|
+
- **画布**:整数倍缩放 `1×…64×`,滚轮以光标为锚点;空格/中键拖动平移,`F` 适应窗口;`4×` 以上显示格线(可关)。
|
|
22
|
+
- **工具**:铅笔、橡皮、油漆桶(按合成后的颜色判断连通,视觉同色一次填满)、吸管;方形笔刷 `1–8` 像素。
|
|
23
|
+
- **图层**:最多 8 层,新建/复制/合并/上移/下移/删除/改名/显隐,全部可撤销。
|
|
24
|
+
- **调色板**:最多 36 色,内置 PICO-8 等预设板;改某个槽位的颜色**不会改动已经画好的像素**(画布上的旧颜色会先由一个空闲槽位接手),也可以用系统取色器可视化取色。
|
|
25
|
+
- **作品**:新建时填名字和尺寸(1–256),另有 11 个常用尺寸预设;自动保存。
|
|
26
|
+
- **打开图片**:选一张喜欢的 PNG / JPEG / GIF / WebP / BMP,自动缩到 256 以内并按需提取配色(也可沿用当前调色板或 PICO-8),可开抖动,生成一个新作品继续画。
|
|
27
|
+
- **画布尺寸 / 裁剪**:`尺寸` 里改宽高(1–256),9 宫格锚点决定裁掉哪边或从哪边扩边,改完可以撤销。
|
|
28
|
+
- **导出**:首次导出选择保存位置(默认从当前会话目录开始),之后导出直接覆盖那个文件;`另存为` 随时换位置,并可挑 1×–16× 的导出倍率(会记住上次的选择)。
|
|
29
|
+
|
|
30
|
+
## 快捷键
|
|
31
|
+
|
|
32
|
+
| 键 | 作用 |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `B` / `E` / `G` / `I` | 铅笔 / 橡皮 / 油漆桶 / 吸管 |
|
|
35
|
+
| `[` `]` | 笔刷变小 / 变大 |
|
|
36
|
+
| `H` | 格线开关 |
|
|
37
|
+
| `F` | 适应窗口 |
|
|
38
|
+
| `+` / `-` | 放大 / 缩小 |
|
|
39
|
+
| 空格 + 拖动、鼠标中键 | 平移画布 |
|
|
40
|
+
| `Ctrl/Cmd+Z` / `Ctrl/Cmd+Shift+Z`(或 `Ctrl+Y`) | 撤销 / 重做 |
|
|
41
|
+
| `Ctrl/Cmd+S` | 保存 |
|
|
42
|
+
| `Ctrl/Cmd+Shift+S` | 另存为 PNG |
|
|
43
|
+
|
|
44
|
+
## 数据与能力
|
|
45
|
+
|
|
46
|
+
- 作品存在 `<profile 目录>/../pixel-studio/works.json`(默认 `~/.dsh/pixel-studio/works.json`),不上传、不联网。
|
|
47
|
+
- 插件只注册一个 Host 路由 `/dsh-pixel-studio`(同源 `fetch`),用于读写作品与写 PNG 文件;不执行命令、不访问网络。
|
|
48
|
+
- 导出的 PNG 由插件自己编码(IHDR + zlib + IEND),不依赖任何图像库。
|
|
49
|
+
|
|
50
|
+
## 环境
|
|
51
|
+
|
|
52
|
+
- DSH 0.2.x(Web / Desktop 均可),Node.js ≥ 20。
|
|
53
|
+
- 客户端用 `window.__ModuleLoader__` 加载,`react` 走宿主模块表,不打包 React。
|
|
54
|
+
|
|
55
|
+
## 许可
|
|
56
|
+
|
|
57
|
+
MIT © 2026 Muxiuesd
|
|
58
|
+
|
|
59
|
+
源码与问题反馈:<https://gitee.com/muxiuesd12138/dsh-pixel>(GitHub 镜像:<https://github.com/Muxiuesd/dsh-pixel>)
|