Files
osmWorkflow/.trellis/tasks/08-04-add-area-asset-budgets/implement.md

25 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Area asset budgets implementation plan
1. 扩展 GLB digest 的 triangles、embedded image bytes、image/source summaries并添加纯 Node
fixture 测试。
2. 在 area config 归一化 `budget`,实现全局默认、数值范围与放宽例外原因校验;更新模板。
3. 在 stage-manifest 提供单一预算评估函数,并接入 Cesium/compress manifest 写入。
4. 让 area diagnostics 与质量门复用预算评估,改进 text report。
5. 添加临时配置或 mock digest 测试,证明超标阻断、放宽无理由拒绝和收紧允许。
6. 更新文档/spec/changelog运行只针对南台子的验证。
## Validation
```bash
node --check scripts/glb-digest.js
node --check scripts/lib/area-config.js
node --check scripts/lib/stage-manifest.js
node --check scripts/lib/area-diagnostics.js
npm run test:preflight
npm run diagnose:area -- --config config/areas/nantaizi-lake-innovation-valley.json
npm run check:area -- --config config/areas/nantaizi-lake-innovation-valley.json
git diff --check
```
不跑 Blender/QGIS/Cesium除非现有 manifest 的 schema 验证无法在纯 Node 层覆盖。