My favorites | Sign in
Logo
                
Search
for
Updated Jul 24, 2009 by soubok
Labels: Featured, screenshot
Screenshots  

Fire effect

source

...
texture.Set(0);
texture.ForEachPixel(function(pixel, x, y) {

 var displace = PerlinNoise(1.9, 0.4, 5, x/2, y/2 + z*1.5);
 var val = PerlinNoise(2, 0.5, 3, (x + displace*40)/6, (y + z + displace*160+(texture.height-y))/8);
 val *= y / texture.height * 1.5;
 pixel[0] = val;
 pixel[1] = val*val*val;
});
z += 0.5;
...

complete source code


Cloud effect

source

...
texture.Set(1);
texture.ForEachPixel(function(pixel, x, y) {

 var dis = PerlinNoise(2.1, 0.5, 5, x-z/2, y);
 var val = PerlinNoise(1.8, 0.6, 7, x-z+dis*8, y);
 pixel[0] = pixel[1] = 1-val;
});
z += 1;
...

complete source code


jsdebug module


jsgraphics module


jsio module


jsfont module + jsprotex module



Comment by peralta....@gmail.com, Sep 30, 2009

Hi! This is very cool, congrats on your work. --Ale


Sign in to add a comment
Hosted by Google Code