Commit Graph

9 Commits

Author SHA1 Message Date
47efb78f1e feat: add native center line style overrides 2026-08-17 13:29:54 +08:00
fb863dafb2 feat: add native road center lines 2026-08-17 10:44:01 +08:00
4c4f4534c0 feat: add native road control markings 2026-08-17 10:01:44 +08:00
1b9829d9ed feat: add native road direction arrows 2026-08-14 18:05:21 +08:00
65cf8b96d9 feat: add native road compiler provider 2026-08-14 15:19:57 +08:00
043766b84e feat: add cesium traffic signal countdowns 2026-08-06 17:01:36 +08:00
400525dd07 fix: match Cesium intersection asphalt 2026-08-05 11:54:26 +08:00
0635c09458 Refactor Cesium material export contract 2026-08-03 11:52:38 +08:00
24e02e2041 refactor: 抽 osmassets 包,要素注册表,材质单一定义源 (P0-P3)
generate_scene.py 从 1271 → 816 行 (-455)

P0: 纯函数搬家
- osmassets/osm.py: parse_osm / Projector / parse_height
- osmassets/geom.py: clip_polygon / point_in_polygon / distance_to_ring / sample_tree_row 等
- blender/tests/test_pure.py: 42 个 unittest (脱离 bpy 运行)

P1: 单一定义源
- osmassets/catalog.py: ROAD_LAYERS + MATERIALS (含 cesium 导出参数)
- 对接 osm2streets_scene_style.json 做图层一致性 warning
- 干掉 road_mats / layer_z / 材质参数三份副本

P2: 要素注册表
- osmassets/{water,grass,scrub}.py: 每个要素一个 assemble() 函数
- build() 中的 if/elif 链收缩为注册表调用
- 计数器集中到 counts 字典

P3: 材质契约化
- catalog.py 扩展 CESIUM_EXPORT 段 (tint/metallic/emission)
- 标记已发现的死条目 Office White Metal Facade (四表各一组)

校验:
- parity.js + scene_digest.py + glb-digest.js 三位一体
- control-1 vs p0/p1/p2a/p2b/p3-counts: 两区域全 PARITY OK
- 42 个纯 Python 测试全部通过

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-29 17:59:32 +08:00