newton_particles 0.4.0
newton_particles: ^0.4.0 copied to clipboard
Create stunning animations with configurable particle emitters. Add rain, smoke, and more effects to your Flutter app!
0.4.0 - 2026-01-11 #
Breaking Changes #
- [Breaking] Migrated physics engine from Forge2D (Box2D) to Chipmunk2D. The underlying physics implementation has changed, but the public API remains compatible. This change improves performance and provides better stability for physics-based particle effects.
- [Breaking] Removed
forge2ddependency. The package now useschipmunk2d_physics_ffiinstead. If you have direct dependencies onforge2din your project, you may need to update your code.
Features #
- [Feature] Chipmunk2D Integration: Full integration with Chipmunk2D physics
engine via
chipmunk2d_physics_ffipackage, providing improved performance and stability for physics simulations. - [Feature] Enhanced Collision Detection: Improved SDF-based collision detection with widget colliders, maintaining all existing functionality with the new physics engine.
Performance #
- [Performance] Improved physics simulation performance with Chipmunk2D engine, especially for large numbers of active particles.
- [Performance] Optimized fixture caching and shape management for better memory efficiency.
Internal Changes #
- [Internal] Replaced
ForgeNewtonWorldwithChipmunkNewtonWorldimplementation. - [Internal] Updated physics world coordinate transformations to work with Chipmunk2D's coordinate system.
- [Internal] Improved collision filter implementation using Chipmunk2D's category and mask system.
Documentation #
- [Docs] Updated documentation to reflect Chipmunk2D migration.
- [Docs] Increased recommended particle limit warnings to 3000 for both physics and deterministic effects in the configurator.
0.3.0 2025-01-XX #
Breaking Changes #
- [Breaking] Renamed
RelativisticEffecttoPhysicsEffectandRelativisticEffectConfigurationtoPhysicsEffectConfigurationfor better clarity and understanding. The old names are deprecated and will be removed in a future version. - [Breaking] Revamped configuration API with grouped properties for better
organization and type safety:
- Introduced
PhysicsProperties,VisualProperties,EmissionProperties,DeterministicProperties, andLayerPropertiesclasses - Configuration is now more organized and easier to understand
- See Migration Guide for details on upgrading
- Introduced
Features #
- [Feature] Widget Collisions: Introduced
NewtonColliderwidget allowing particles to collide with Flutter widgets. Supports rounded corners, friction, and restitution with accurate physics using Signed Distance Fields (SDF). - [Feature] Effect Presets: Added preset configurations for common effects:
ConfettiPreset- Celebratory confetti effectRainPreset- Realistic rain effectSnowPreset- Snowfall effectExplosionPreset- Explosion effectFountainPreset- Fountain effect
- [Feature] Particle Pool: Introduced
ParticlePoolfor reusing particle instances, reducing memory allocations and improving performance. - [Feature] Debug Data Stream: Added
debugDataStreamtoNewtonStatefor real-time monitoring of particle effects, active particle counts, and performance metrics. - [Feature] Code Generator: Enhanced configurator with ability to copy generated code for easy integration.
Performance #
- [Performance] Introduced viewport culling to skip rendering particles outside the visible area, significantly improving performance for large particle counts.
- [Performance] Improved particle sorting strategy for more efficient rendering.
- [Performance] Introduced fixture cache in physics engine to avoid unnecessary fixture recreation.
- [Performance] Optimized collider reporting by removing redundant postFrameCallback in NewtonCollider.build() method, reducing unnecessary work on every rebuild.
Fixes #
- [Fix] Added missing setState() call to clearEffects() method to ensure proper widget rebuild.
- [Fix] Fixed colliders stopping to work when configuration properties (delay, particles per emit, etc.) were changed. Colliders now properly re-report their positions after configuration changes.
- [Fix] Colliders are now preserved during temporary coordinate conversion failures that can occur during widget rebuilds.
- [Fix] Improved collider syncing to physics effects, ensuring colliders are properly synchronized when effects are updated or recreated.
Documentation #
- [Docs] Added comprehensive migration guide for upgrading from 0.2.x to 0.3.x.
- [Docs] Added widget collisions documentation with examples and best practices.
- [Docs] Updated presets documentation with new preset system.
- [Docs] Improved overall documentation structure and clarity.
0.2.3 - 2025-12-27 #
- [Chore] Fix lints and upgrade dependencies
- [Fix] Fix foreground property not behaving as expected. Thanks @redredninjacat.
- [Feat] Implemented ShapeBuilder and ZIndexBuilder. Thanks @redninjacat.
0.2.2 - 2024-09-06 #
- [Fix] Remove code generation that is not available for now.
- [Fix] Use gif instead of a video.
0.2.1 - 2024-09-06 #
- [Fix] Pub.dev doc site
0.2.0 - 2024-09-06 #
- [Breaking] Support physics based animation. Revamp the way effects are configured and added to the Newton widget.
- [Breaking] Replace duration based properties as int by Duration.
- [Breaking] Origin is now relative to the widget size.
- [Performance] No more unnecessary repaints. thanks @VonZen
- [Performance] Images are now properly garbage collected when animations end.
0.1.8 - 2024-06-03 #
Fix #
-
[Fix] Fix #24 Fix name collision in NewtonState.removeEffect by @KriseevM
-
[Fix] Add missing setState to clearEffects by @jannikhst
0.1.6 - 2023-11-05 #
Feature #
- [Feature] Add support for background and foreground effects
- [Feature] Add/remove effects at runtime
0.1.0 - 2023-08-10 #
Fix #
- [Fixed] Improve performance drastically by using drawAtlas as much as possible.
0.0.11 - 2023-08-06 #
Feature #
- [Feature] Allow to add a post effect to a particle.
- [Feature] Allow a finite number of particles.
- [Feature] Add firework example.
0.0.10 - 2023-08-04 #
0.0.5 - 2023-08-01 #
Feature #
- [Feature] Introduce the notion of PathTransformation for particles.
- [Feature] Add a fountain like effect.