feat(web): studio worlds, camera-view/offscreen environment parity, material and undo coverage
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

Environment lighting:
- ship all eight desktop studiolights/world datasets (WBENV1 float32) and a
  shared loader used by both the main viewport and the offscreen worker
- add the N-panel "studio 环境" selector
- rotate the world background together with the environment
  (backgroundRotation/backgroundIntensity), so camera view and offscreen
  renders match the desktop Mapping-node behaviour

Verification (Chromium, OPFS, NOT_CLAIMED):
- environment lighting + 8 world pixel identity
- camera-view rotation correspondence (camera matrices, 207 samples)
- offscreen vs on-screen background parity after hiding geometry (1305 samples)
- metals case extended with material-field OPFS roundtrip
- material Principled edits and rename undo/redo
- eight studio worlds: pairwise frame differences + luminance rank correlation
- undo history depth capped at 64 steps and undo across OPFS save/reopen

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-23 09:27:47 +08:00
parent f96654b158
commit 63db6caf1f
325 changed files with 20004 additions and 762 deletions

View File

@@ -15,7 +15,8 @@
## 移植铁律
- **OPFS 优先(用户铁律)。** 平台的工作过程——保存、重开、恢复、课程录制与自动测试——全部使用 OPFS;需要下载到本地时,必须由用户手动触发独立的“下载 .blend”入口,禁止在保存/编辑流程中自动下载。课程与测试不得依赖自动下载文件来重开工程。
- **OPFS 优先(用户铁律)。** 平台的工作过程——保存、重开、恢复——全部使用 OPFS;需要下载到本地时,必须由用户手动触发独立的“下载 .blend”入口,禁止在保存/编辑流程中自动下载。
- **全部落盘只用 OPFS,禁用 IDBFS/IndexedDB(用户铁律)。** Web Blender / Web FreeCAD 创建的一切文件与全部工作过程文件(场景、快照、渲染结果、渲染中间帧、导出、缓存、临时目录)一律写入 OPFS;`/browser` 等原生虚拟文件系统必须挂载 OPFS 后端,禁止使用 IDBFS 或 IndexedDB 作为持久化承载。**例外:课程录制与自动测试的产物不写入 OPFS**,仍按各自既有目录落盘。现状 `web/app/src/workers/web-engine.worker.ts` 的 `mountBrowserFS` 仍挂 `IDBFS`,属待改造缺口,按批次迁移到 OPFS。
- **验证前置条件优先。** 验证时,先准备前置条件,之后再验证;前置条件准备也必须考虑依赖关系和先后顺序,以提高验证的准确性和效率。按依赖顺序准备构件与资源、运行环境、服务与接口、数据与场景;前置条件不满足时先补齐,不重复运行依赖它的下游验证。复用仍有效的前置检查结果,环境或依赖变化后仅重新检查受影响项;如实记录缺项、失败及验证范围。
- **按合理的小批次推进。** 每批只处理一个明确业务缺口及其必要调用链;单次读源码≤30行、修改≤2文件且增删合计≤10行(含交接)。按实际字节控制提交提示、交接与工具输出,区分已统计内容与系统附加内容;断流/超量后缩小下一批,连续稳定交接后才有界放宽。达到预算先保留源码与continuationNotes(断点、已完成、残余、下一动作)再续接,禁止堆叠全量历史、盲目重发大包或靠删缺口缩量;不改变实现期禁止验证的规则。
- **当前工作定位:用户明确“桌面 Blender → Web Blender 移植”基本完成,后续仅以补充具体功能缺口为主,不得重新开展整体移植或偏离主线。科学、高效率地充分复用已有源码、模块、适配接口、WASM 和应用产物,使操作者能使用全面完整的功能。**