Flint Particle System Forum - perlinNoise() for moving the particles in a force's field2010-11-17T10:18:46+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
perlinNoise() for moving the particles in a force's fieldhttp://flintparticles.org/forum/comments.php?DiscussionID=28&Focus=132#Comment_1322008-05-14T12:21:58+01:002008-05-20T10:04:49+01:00raffouhttp://flintparticles.org/forum/account.php?u=25
i've discovered recently Flint particle system and found it very useful but the documentation is a little bit too short :)
My problem is : how integrate a perlinNoise (say , in a bitmapdata) for ...
My problem is : how integrate a perlinNoise (say , in a bitmapdata) for creating a force's field (i'm not sure it's the right word in english) controlling the velocity and acceleration of particles created in Flint]]>
perlinNoise() for moving the particles in a force's fieldhttp://flintparticles.org/forum/comments.php?DiscussionID=28&Focus=138#Comment_1382008-05-19T15:14:02+01:002010-11-17T10:18:46+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi Raffou, welcome aboard.
It depends if you want to use the perlin noise to set the initial velocity and acceleration or to modify the velocity and acceleration as the particle moves.
To set ...
It depends if you want to use the perlin noise to set the initial velocity and acceleration or to modify the velocity and acceleration as the particle moves.
To set the initial velocity and acceleration you need one or two custom initializers. An initializer extends the Initializer class and implements a custom initialize() method. This method is called when each particle as it's created. It receives a reference to the particle and the emitter. Use the method to set the appropriate properties on the particle (in your case, the velocity and/or acceleration).
To alter the velocity and acceleration of the particle as it moves you need one or two custom actions. An action extends the Action class and implements a custom update method. This method is called every frame for every particle (so make it as efficient as you can). It receives a reference to the particle and the emitter and the duration (in seconds) of the frame. Use the method to alter the properties of the particle (again, in your case, the velocity and/or acceleration).
Take a look at the source code for the actions and initializers in the library for hints.]]>