From fccb505e7fb510d888ebbb6250cc8be33a4f0efe Mon Sep 17 00:00:00 2001 From: flycran Date: Fri, 6 Nov 2026 17:14:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=E6=B8=85=E7=90=86=E6=AD=BB?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E4=B8=8E=E6=AE=8B=E7=95=99=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除源码未引用的 @dimforge/rapier2d(全部使用 -compat)和模板残留的 optionalDependencies;compressionTolerance 单位说明与 README/action.yml 对齐;删除 getTextBoundBox 的占位 JSDoc 与 RenderedContribution 的重复注释。 --- bun.lock | 6 ------ package.json | 4 ---- src/utils/physics.ts | 8 ++------ 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/bun.lock b/bun.lock index a439d57..ca53293 100644 --- a/bun.lock +++ b/bun.lock @@ -6,7 +6,6 @@ "name": "github-gravity", "dependencies": { "@actions/core": "^3.0.0", - "@dimforge/rapier2d": "^0.19.3", "@dimforge/rapier2d-compat": "^0.19.3", "@kitajs/html": "^4.2.13", "opentype.js": "^2.0.0", @@ -28,9 +27,6 @@ "rollup": "^4.57.1", "typescript": "^5.9.3", }, - "optionalDependencies": { - "@rollup/rollup-linux-x64-gnu": "*", - }, }, }, "packages": { @@ -98,8 +94,6 @@ "@bufbuild/protoplugin": ["@bufbuild/protoplugin@2.16.0", "https://registry.npmmirror.com/@bufbuild/protoplugin/-/protoplugin-2.16.0.tgz", { "dependencies": { "@bufbuild/protobuf": "2.16.0", "@typescript/vfs": "^1.6.2", "typescript": "5.4.5" } }, "sha512-3FdYJys34VhFnBQsjiV9wurBkX/DBACQAkAk+nCKdO1p8ROVNi7gmaRAcba+4qq8hQq8rYVukuutwvGCvd4kJA=="], - "@dimforge/rapier2d": ["@dimforge/rapier2d@0.19.3", "https://registry.npmmirror.com/@dimforge/rapier2d/-/rapier2d-0.19.3.tgz", {}, "sha512-3dz6q3E3+Gbla1qje6/EhzlZ+nH/oQNpUASM4Mspk8DPPH7itxutpLJyvbu7Nci1aW1hhHp7eBZ3w3j45O5MiQ=="], - "@dimforge/rapier2d-compat": ["@dimforge/rapier2d-compat@0.19.3", "https://registry.npmmirror.com/@dimforge/rapier2d-compat/-/rapier2d-compat-0.19.3.tgz", {}, "sha512-5HZUgiSpu9Uba3He+4SCPVte3h2vgxcodkxWThRjd3X/zgq/Z4OyRUKpNEOsOR6AC+OfulPkkZ5asZGzRMpcwA=="], "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.2", "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", { "os": "aix", "cpu": "ppc64" }, "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ=="], diff --git a/package.json b/package.json index 873263f..204f23f 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,6 @@ "license": "MIT", "dependencies": { "@actions/core": "^3.0.0", - "@dimforge/rapier2d": "^0.19.3", "@dimforge/rapier2d-compat": "^0.19.3", "@kitajs/html": "^4.2.13", "opentype.js": "^2.0.0", @@ -67,8 +66,5 @@ "pixi.js": "^8.22.0", "rollup": "^4.57.1", "typescript": "^5.9.3" - }, - "optionalDependencies": { - "@rollup/rollup-linux-x64-gnu": "*" } } diff --git a/src/utils/physics.ts b/src/utils/physics.ts index 2c5d0c3..6d67bdf 100644 --- a/src/utils/physics.ts +++ b/src/utils/physics.ts @@ -179,9 +179,6 @@ export interface TextPathResult { /** * 计算所有字形的整体包围盒 - * @param textPaths - * @param param1 - * @returns */ export function getTextBoundBox( textPaths: TextPathResult[], @@ -215,7 +212,6 @@ export function getTextBoundBox( } } -/** 渲染用贡献方块:轨迹已统一为关键帧形态(未压缩时为无 span 的全量关键帧) */ /** 渲染产物:模拟产出的贡献方块叠加压缩后的轨迹 */ export interface RenderedContribution extends Omit { @@ -247,8 +243,8 @@ export interface SimulationOptions { /** 字体大小 */ fontSize?: number /** - * 轨迹压缩容差,单位 SVG 像素。播放时每个原始时刻的插值坐标与真实坐标 - * 在横向、纵向上各自的偏差不超过该值 + * 轨迹压缩容差,单位 SVG 坐标单位。播放时每个原始时刻的插值坐标与真实坐标 + * 的偏差不超过该值(CSS 引擎按轴向、SMIL 按合成位移) */ compressionTolerance?: number /** 禁用轨迹压缩,保留完整轨迹。调试用途,action无法禁用压缩 */ From 894abffd4e41742d9c15b38f70df9948ab7dfd76 Mon Sep 17 00:00:00 2001 From: flycran Date: Fri, 6 Nov 2026 17:14:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E9=87=8D=E6=96=B0=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=20dist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index c1f82cc..2d22b00 100644 --- a/dist/index.js +++ b/dist/index.js @@ -52873,9 +52873,6 @@ async function createWorld(width, height) { } /** * 计算所有字形的整体包围盒 - * @param textPaths - * @param param1 - * @returns */ function getTextBoundBox(textPaths, { width, height, textTop }) { let minX = Infinity, maxX = -Infinity, maxY = -Infinity;