Files
MapLibreParticleLab/docs/50_Step记录/STEP-055_Android真实WeatherV2风场综合可视化_v7.md
OpenAI Codex f8e715d080
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled
fix: keep particle density stable across zoom
2026-09-05 12:23:15 +08:00

2.1 KiB
Raw Permalink Blame History

STEP-055 Android 真实 WeatherV2 风场综合可视化 v7

状态:IMPLEMENTED / WAITING_ANDROID_VALIDATION

Starting HEAD:d9a9c8ed57605abca86893ba7fb3b5265db3c0dc

Zoom 下 Viewport 粒子密度调整

  • configured particleCount 不随 zoom 改变,仍由既有用户设置控制;本次没有按 zoom 重建 State slot,也没有新增均匀网格铺点。
  • C++ 使用当前 viewport 四角的 unwrapped Web Mercator AABB,水平和垂直各扩展 15%,再与 canonical Field bounds 取交集,作为稳定相机时的 respawnBounds。
  • shader 保留 u_field_bounds 作为唯一 Field 采样/UV 映射范围;新增独立 u_respawn_bounds 和 viewportDensityActive(u_field_scale.z),防止把可视范围误作数据有效范围。
  • camera moving 期间 viewportDensityActive=false,普通 invalid/age 生命周期仍在 full Field 复生,State 不 reset、Field 不重提、Timeline 不重置。稳定至少 150ms 后才启用 viewport domain。
  • stable 后,位于 expanded viewport 外的 slot 成为额外 respawn 条件;新出生 slot age=0、alpha=0,因此不会产生跨屏 segment。viewport 内的正常粒子不被统一重置。
  • 若四角 AABB 无效、交集为空或 extent 过小,安全回退 full Field bounds;日志为 ParticleDensity mode=FIELD_FALLBACK fallback=true,不会产生 NaN/inverted bounds。

保持的边界

State A/B=Float、Trail A/B=UnsignedByte、previousPosition→currentPosition、zoom-aware visual speed、wall-time lifecycle、time-based fade 与 camera Trail invalidate/stable resume 保持。canonical U/V=m/s、WeatherV2 assets、Host Submission、Timeline、Runtime Field Window、WeatherColorLayer 与 REAL WEATHER UI 未修改。

验证

  • shader generator:PASS。
  • Linux OpenGL 精确编译 render_particle_validation_layer.cpp:PASS。
  • 既有非 Jest style_layer.test.cpp 精确编译:PASS。
  • git diff --check:PASS。
  • Android Gradle/APK/ADB/设备和 Jest:未执行。

下一步由用户按人工验收 v7 检查 z2–3/z5/z8–9 密度、相机稳定后的补充行为和 Timeline boundary 回归。