Jorge Vallejo Blog

Blog del creativo, ilustrador y profesor de videojuegos Jorge Vallejo

Animación de particulas


Últimamente estoy experimentando mucho con la animación de partículas, el video que podéis ver esta creado mediante una expresión matemática, con la que se consigue que describa círculos.
Os dejo el Código :
radius = 350; // the radius of the circle
cycle =3 // number of seconds to complete a circle; higher value = slower
if(cycle ==0){cycle = 0.001;} //avoids a “divide by zero” error
phase = 0; // initial angle in degrees from bottom
reverse = 1; // 1 for ccw, -1 for cw
x = Math.sin( reverse * degrees_to_radians(time * 360 / cycle + phase));
y = Math.cos(degrees_to_radians(time * 360 / cycle + phase));
add(mul(radius, [x, y]), position)

Ad debug output

The ad is displayed on the page

current post: Animación de particulas, ID: 1387

Ad: Anuncio2 (2573)
Placement: After Content 2 (after-content_2)

Display Conditions
general conditions
Adwp_the_query
term_id0
taxonomy0
is_main_query11
page01
numpages01
is_archive1
is_search1
is_home1
is_4041
is_attachment1
is_singular11
is_front_page1
is_feed1




Find solutions in the manual

Leave a Reply

Your email address will not be published. Required fields are marked *