ParallaxRain 是一個 Flutter 套件,讓開發者能在應用程式中創造沉浸式的 3D 雨效果。透過可自訂的功能,例如多種雨滴顏色、可變的落點速度與軌跡效果,提升背景與互動場景的視覺吸引力。適合追求氣氛感或電影風格的應用程式,支援所有主要平台,包含行動裝置、網頁與桌面端。此套件可順暢整合至 Flutter 的渲染流程中,並利用著色器實現流暢效能。
適用情境
建立動態應用背景
增強遊戲環境
為啟動畫面添加電影效果
透過視覺反饋提升使用者參與度
基於情緒設計介面
主要特色
可自訂的雨滴顏色
可調節的雨滴速度
雨滴軌跡效果
跨平台支援
基於著色器的渲染
與 Flutter 小部件的輕鬆整合
適合對象
尋求視覺魅力的UI設計師
遊戲開發者建構沉浸式場景
專注於氛圍的應用程式創作者
針對多平台部署的開發者
具有藝術主題的創意專案
使用建議
可能影響低階裝置的效能
需要了解基本的著色器概念
最適合用於背景層,不適合主要內容
超出雨天特定參數的自訂功能有限
不適合高頻率互動元件
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
Parallax Rain
Create a cool 3D rain effect, with plenty of customization!
Installation
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies:parallax_rain:
2. Install it
You can install packages from the command line:
$ pub get
..
Alternatively, your editor might support pub. Check the docs for your editor to learn more.
3. Import it
Now in your Flutter code, you can use:
import'package:parallax_rain/parallax_rain.dart';
Usage
If you want to give YourWidget a 3D rain background, simple wrap it with the ParallaxRain widget, with YourWidget as the child parameter. You can also have the rain effect in the foreground, use multiple drop colors, adjust the speed, add trails to your drops and lots more!
A full example can be found in the example directory
About me
Visit my LinkedIn at https://www.linkedin.com/in/zaca
I'm also the author of the Flutter glass package that allows you to convert any flutter widget into a glass/frosted glass version of itself, check it out at https://pub.dev/packages/glass