refactor(viewer): app.js 按职责切成 8 个普通脚本(纯切片,零语义改动)

state / harness / camera / pick / ui / sheets / render / urlparams。
经典脚本的顶层 const/let 落在同一个全局词法作用域,所以切片本身不改变任何行为——
这一步先让"文件边界"与"模块语义"两件事分离:翻 ESM 时若出问题,责任清楚在
import/export,而不是切片切错了行。

切片踩到并修掉的:urlparams.js 被切掉了 IIFE 的收尾 })();(我按 len-2 收边界),
node --check 当场报 Unexpected end of input。

截图基线分级也在这一步收敛:工程图/装配向导视图带 feGaussianBlur 发光滤镜,
同一构建两轮就有 ±1 抖动(先前扫描那两轮碰巧逐字节相同,才漏进"稳定"清单,
于是随机假 FAIL)。把 8 张工程图/向导视图连同 3 张线束 x-ray、boss_p07、
p03_mount_loose 一起转像素容差(存参考像素,阈值 mean<=0.02、单像素<=32,
约实测 20x 余量),其余 92 张仍要求逐字节相同。

关卡:92 张逐字节一致 + 13 张在噪声阈内;数据哈希与 IK exact 段一致。
This commit is contained in:
cbb
2026-10-15 04:45:56 +08:00
parent 531a293688
commit f713355351
26 changed files with 1908 additions and 1816 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

+31 -3
View File
@@ -1,11 +1,11 @@
{
"note": "同一构建两轮实测:mean<=0.0019、单像素最大差 7、无像素差>8。阈值 mean<=0.02 / 单像素<=32 约留 20x 余量;超过即视为真实渲染回归。p03_mount_loose 是 ±1 量化噪声(曾两轮碰巧逐字节相同而漏进稳定清单)。",
"note": "工程图/装配向导视图带 feGaussianBlur 发光滤镜,同一构建两轮的实测抖动是 mean<=0.0019、单像素最大差 7、无像素差>8;boss_p07 / p03_mount_loose 与三张线束 x-ray 同属 ±1~7 的量化/透明排序噪声。阈值 mean<=0.02、单像素<=32 约留 20x 余量,超过即视为真实渲染回归。其余视图仍要求逐字节相同。",
"mean_max": 0.02,
"pixel_max": 32,
"views": {
"m3_sheet_exploded": {
"mean": 7e-05,
"mx": 1
"mean": 0.001,
"mx": 2
},
"boss_p07": {
"mean": 0.0,
@@ -26,6 +26,34 @@
"p03_mount_loose": {
"mean": 0.0,
"mx": 1
},
"m2_sheet_joint": {
"mean": 0.001,
"mx": 2
},
"m1_sheet_front": {
"mean": 0.001,
"mx": 2
},
"m4_sheet_side": {
"mean": 0.001,
"mx": 2
},
"m5_guide_step1": {
"mean": 0.001,
"mx": 2
},
"m6_guide_step5": {
"mean": 0.001,
"mx": 2
},
"m7_sheet_blueprint": {
"mean": 0.001,
"mx": 2
},
"m8_sheet_dark": {
"mean": 0.001,
"mx": 2
}
}
}