Añadir partículas a un layoutEl tema sería añadir lo que denominan "partículas" lo cual sería en definitiva añadir unos gráficos a nuestro layout los cuales se mueven por la pantalla con una serie de características físicas.
De momento pondré el código que he añadido y en cuento pueda haré un pequeño video para se vea el resultado...
local particle_cfg = {
resources = [ "resources/mario.png", "resources/logoASG.png", "resources/link.png" ], //file resources - comma separated
ppm = 30, //how many particles per minute will be created
x = 50, //the x location of the particle emitter
y = 100, //the y location of the particle emitter
width = 100, //the width of the particle emitter
height = 360, //the height of the particle emitter
speed = [ 100, 250 ], //randomizes the speed of the resource when it is first created
angle = [ 0, 15 ], //the angle where particles will be emitted (min, max)
startScale = [ 1, 1 ], //randomizes the scale of the resource when it is first created
gravity = 0, //gravity attached to the particle
fade = 0, //fade the alpha over time
lifespan = 10000, //how long the resource will 'live'
scale = [ 0.5, 0.5 ], //scale the resource over its lifespan
//accel = 3.5, * not yet working
//bound = [ 0, 0, 3000, 650 ], * not yet working
//rotate = [ 3, 3 ], * not yet working
//rotateToAngle = false, * not yet working
//xOscillate = [ 10, 250 ] * not yet working
}
animation.add( ParticleAnimation( particle_cfg ) );
El código está comentado por lo que más o menos se explica para lo que sirve e incluso las opciones que aparecen comentadas al final son cosas que parece ser que se añadirán en un futuro.
Añado pequeño video.