feat: 调整喜鹊位置并更新 PDF 导出

- 删除左上角喜鹊,左下喜鹊右移 3 格,右上喜鹊左移 1 格
- PDF 默认输出改为封面demo.pdf
- 重新生成 PDF 样例
This commit is contained in:
rogerwang2008 committed 2026-11-10 21:47:23 +08:00
1 parent 2b6b13944c
commit f3d165b0f6
4 files changed
+8 -8

No files matched your search

+3 -2
View File
@@ -18,6 +18,7 @@
├─ pyproject.toml # uv 环境与导出依赖 ├─ pyproject.toml # uv 环境与导出依赖
├─ uv.lock # 依赖锁定 ├─ uv.lock # 依赖锁定
├─ scripts/export_pdf.py # PDF 导出脚本 ├─ scripts/export_pdf.py # PDF 导出脚本
├─ 封面demo.pdf # 导出的 PDF 样例
├─ assets/ ├─ assets/
│ ├─ css/style.css # 布局、字号与各元素配色 │ ├─ css/style.css # 布局、字号与各元素配色
│ ├─ js/scene.js # 场景数据与网格渲染 │ ├─ js/scene.js # 场景数据与网格渲染
@@ -40,8 +41,8 @@ python -m http.server 8000
```bash ```bash
uv sync uv sync
uv run python scripts/export_pdf.py # 默认 1em = 24px,输出 dist/luori.pdf uv run python scripts/export_pdf.py # 默认 1em = 24px,输出 封面demo.pdf
uv run python scripts/export_pdf.py --em 16 -o dist/luori-16.pdf uv run python scripts/export_pdf.py --em 16 -o 封面demo-16.pdf
``` ```
脚本优先调用本机 Edge / Chrome;若都未安装,可先下载 Playwright Chromium: 脚本优先调用本机 Edge / Chrome;若都未安装,可先下载 Playwright Chromium:
+2 -3
View File
@@ -39,11 +39,10 @@
/* 飞鸟:数量减少,间距不等,仅少量成对;上下拉开分布 */ /* 飞鸟:数量减少,间距不等,仅少量成对;上下拉开分布 */
const birds = [ const birds = [
{ x: 0, y: 2, kind: 'magpie' }, { x: 25, y: 2, kind: 'magpie' },
{ x: 26, y: 2, kind: 'magpie' },
{ x: 1, y: 4, kind: 'sparrow' }, { x: 1, y: 4, kind: 'sparrow' },
{ x: 3, y: 8, kind: 'crow' }, { x: 3, y: 8, kind: 'crow' },
{ x: 6, y: 13, kind: 'magpie' }, { x: 9, y: 13, kind: 'magpie' },
{ x: 9, y: 15, kind: 'sparrow' }, { x: 9, y: 15, kind: 'sparrow' },
{ x: 26, y: 5, kind: 'crow' }, { x: 26, y: 5, kind: 'crow' },
{ x: 17, y: 9, kind: 'sparrow' }, { x: 17, y: 9, kind: 'sparrow' },
+3 -3
View File
@@ -5,7 +5,7 @@
用法: 用法:
uv run python scripts/export_pdf.py uv run python scripts/export_pdf.py
uv run python scripts/export_pdf.py --em 16 -o dist/luori-16.pdf uv run python scripts/export_pdf.py --em 16 -o 封面demo-16.pdf
""" """
from __future__ import annotations from __future__ import annotations
@@ -138,8 +138,8 @@ def main() -> None:
"-o", "-o",
"--out", "--out",
type=pathlib.Path, type=pathlib.Path,
default=ROOT / "dist" / "luori.pdf", default=ROOT / "封面demo.pdf",
help="输出文件路径,默认 dist/luori.pdf", help="输出文件路径,默认 封面demo.pdf",
) )
args = parser.parse_args() args = parser.parse_args()
if args.em <= 0: if args.em <= 0:
BIN
View File
Binary file not shown.