Color Fire!

Upload your latest creations here, and download the latest creations here! This is where the creative tool shop resides.
Post Reply
Dr. Madskull
Posts: 20
Joined: Tue Jun 04, 2019 11:35 am

Color Fire!

Post by Dr. Madskull » Sat Nov 16, 2019 12:31 am

Taking the old fire screen saver and adding colors. Simple and beatiful!

The default is a blue spooky tint, but you can easily change it by enabling the code block you desire:

Code: Select all

// Orange is the new red.
{
  fireArray[i][0].r=Math.floor(Math.random()*256); // Using floor means it never reach 256. 

  // To get pitch dark areas. 
  if(fireArray[i][0].r < 150)
    fireArray[i][0].r = 0;
  
  fireArray[i][0].g=Math.floor(Math.random()*fireArray[i][0].r);
  fireArray[i][0].b=0;
}
Try fiddling with the r g b values, it get pretty pretty easy. :mrgreen:
Attachments
yoss_color_fire.js
(7.65 KiB) Downloaded 471 times

Post Reply