I just released an update of Leonids Lib. It includes feedback from previous versions both from github and the workshop I gave at GDGFestDublin.
From this version on, speed and acceleration are using dips. This makes a lot of sense, since the library should work together with the standard concepts of the Android framework. Animations should me much more consistent among different pixel density screens now.
Previous versions were using pixels, so you may want to review your parameters when you update.
There are some new configuration options:
- emitWithGravity: Allows you to emit from a specific side of the View and particles will be emitted along all the edge of the View. i.e. Gravity.BOTTOM will create a rain-like effect. Default is Gravity.CENTER.
- updateEmitPoint: Allows to dynamically change the point of emission for the particle system (useful to follow the touch along the screen)
- stopEmitting: Will stop creating new particles, but the existing ones will keep animating (this is different from cancel, which also stops the already spanned ones)
- emit now has methods to emit from a specific point on the screen given x and y instead of from a View.
Also, new examples are being included to showcase the new features:
- Emit with Gravity: Simulates a rain-like effect using Gravity.BOTTOM.
- Follow touch: Creates a trail of stars following the touch on the screen.