Skip to content

fix(map): rebuild the wind particle renderer - #611

Merged
whes1015 merged 1 commit into
mainfrom
feat/wind-windy-pipeline
Oct 15, 2026
Merged

whes1015 merged 1 commit into
mainfrom
feat/wind-windy-pipeline

Conversation

@whes1015

@whes1015 whes1015 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

這個 PR 做了什麼

風場粒子在 iOS 上下顛倒,部分 Android 整片往同一個方向飛;拖動、縮放時尾跡會消失。fork 從 48bce744 升到 a368208e,數值改在原生端,手勢中不再暫停。

  • 四個 ref 同一個 commit:maplibre_gl、platform interface、web override、pubspec.lock。版本 0.26.2 → 0.27.1。兩個 Package.resolved 的 MapLibre Native 6.27.0 → 6.28.0。
  • wind_particle_native.dart 不再送 tuning。圖層可見且風場有資料就播放。
  • wind_forecast_layer.dart 拿掉 interacting 和手勢 override。暫停會把尾跡清掉,拖完要等它重長。
  • wind_particle_sim.dart 改成跟 GPU 同一套的對照,正式版不跑它。釘住連續 zoom(跨過 .5 不再跳一檔)、速度 30 m/s 封頂、靜風編碼成 byte 128、取樣補半格、尾跡每幀留 0.97。平移時尾跡跟著地圖,縮放或旋轉才清空。
  • 測試改成對這套數學。刪掉 wind_web_parity_test.dart(對的是舊網頁版調參)。

相關 issue

沒有對應的 issue。

怎麼驗

  • CI:commit 訊息 gate、analyze 已過。測試(coverage)還在跑。Android 建置已過,iOS 建置還在跑。
  • Android 模擬器與 Pixel 9:粒子有方向,拖動時尾跡跟著地圖,放大後依新的 zoom 重長。
  • iOS 實機沒看過。合併前要在 iPhone 上看一次。

檢查清單

  • tool/check/commits.sh origin/main..HEAD 通過
    —— commit 訊息就是更新日誌,格式見 commit.md
  • 一個 commit 一件事(這條 gate 驗不了,靠自己和 review)
  • mise exec -- flutter analyze 與 mise exec -- flutter test 通過
    —— analyze 已過;這輪 CI 的測試還沒跑完
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死
  • 有 UI 變更的話:用的是 AppSpacing / AppRadius / AppMotion,
    深色模式看過,文字對比度可接受
    —— 沒有 Flutter UI 變更

@github-actions

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 7 selected item(s).

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.05660% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.42%. Comparing base (6f9e9c9) to head (25872c2).

Files with missing lines Patch % Lines
...res/map/presentation/layers/wind_particle_sim.dart 99.00% 1 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@whes1015

Copy link
Copy Markdown
Member Author

補上漏掉的 iOS 相依:新 fork 的 Package.swift 把 MapLibre Native 釘死在 6.28.0,但這個 PR 原本的 Package.resolved 還是 6.27.0,Xcode 每次建置都會自己改寫它。已併進同一個 commit 並 force push(還沒有 review)。

推送用了 --no-verify:從 worktree 推送時 pre-push 會碰到 #612 修的問題。同一套 gate 在 hook 外跑過,全部通過。

@whes1015
whes1015 force-pushed the feat/wind-windy-pipeline branch 3 times, most recently from 29e5ae7 to 21a1f60 Compare October 15, 2026 21:33
Platform: all

Fix(zh-Hant): 修正風場粒子在 iOS 上下顛倒、在部分 Android 手機上全部往同一個方向飛
Fix(en-US): wind particles are no longer upside down on iOS or all flying the same way on some Android phones
Optimization(zh-Hant): 風場粒子改成較長的流線尾跡,拖動與縮放地圖時跟著地圖移動,不再消失
Optimization(en-US): wind particles leave longer flowing trails and move with the map while you pan or zoom instead of disappearing
@whes1015
whes1015 force-pushed the feat/wind-windy-pipeline branch from 21a1f60 to 25872c2 Compare October 15, 2026 21:34
@whes1015 whes1015 changed the title fix(map): draw wind particles the way Windy does fix(map): rebuild the wind particle renderer Oct 15, 2026
@whes1015
whes1015 merged commit 1c324db into main Oct 15, 2026
@whes1015
whes1015 deleted the feat/wind-windy-pipeline branch October 15, 2026 21:55
@lowrt lowrt added this to the v26.4 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants