Particular 是一个高性能的 Flutter 小部件,专为创建流畅且可自定义的粒子效果而设计。它利用先进的渲染技术,在移动、Web 和桌面等多个平台上实现流畅的动画效果。非常适合用于增强应用背景中的动态视觉元素,支持渐变、着色器和实时交互。该包经过性能优化,即使在复杂场景下也能保持高帧率。通过简单的 API 和丰富的配置选项,开发者可以轻松地将惊艳的粒子系统集成到自己的应用程序中。
适合场景
创建动画应用背景
通过动态视觉效果增强用户界面
添加交互式粒子动画
改进应用入门体验
设计沉浸式登录页面
实现环境背景效果
主要特点
高性能渲染
跨平台支持(Android、iOS、Web、macOS、Windows、Linux)
对渐变和着色器的支持
实时粒子交互
可自定义的粒子行为
轻量且高效
适合对象
寻求视觉魅力的UI设计师
开发人员构建引人入胜的引导屏幕
需要环境背景动画的应用程序
交互式数字体验
注重性能的项目
创意应用界面
使用建议
可能需要针对低端设备进行优化
复杂的配置可能会增加构建时间
除了基本示例外,文档有限
不适合静态或简单的背景
需要理解粒子系统概念
大量粒子数量可能导致的内存使用
原始 README
以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。
Enhance your app or game visuals with this high-performance Flutter Particles System widget. Utilize JSON or programmatic configuration, seamlessly integrating with popular particles editors for effortless customization.
Customizable (live) Particle Effects.
Ready Presets (JSON Configs).
Seamless Integration with Editors.
Optimized Performance with 1~10k particle at frame
Whether you're a designer or developer, Particular empowers you to bring your creative visions with ease.
- Some Presets:
- Installation
Add particular to your pubspec.yaml file:
For detailed installation instructions, refer to the installation guide on pub.dev.
- Configurate your particles
You have two options for configuring your particles:
Programmatic Configuration:
Manually configure your particle controller in code. Refer to the following steps for more details.
- Getting Started with Coding
Follow these steps to integrate the particles system into your Flutter app:
I. Insert Particle Files into Your Project:
The Particular Editor exports one or multiple particle layers. For each particle layer, it generates a configuration file (configs.json) and a related image file (texture.png). In the configuration file, there is a node named textureFileName, which refers to the image file. Place the image and configs.json file in your project's assets folder, and add the necessary assets entry in your pubspec.yaml file.
This revised README provides clear installation instructions, options for configuring particles, and steps for integrating and customizing the particle system in your Flutter app. If you have any questions or need further assistance, don't hesitate to ask!