Skip to content

Instantly share code, notes, and snippets.

@mk30
Created August 8, 2014 00:03
Show Gist options
  • Select an option

  • Save mk30/3ed6f050f2bec86e0a68 to your computer and use it in GitHub Desktop.

Select an option

Save mk30/3ed6f050f2bec86e0a68 to your computer and use it in GitHub Desktop.
evocative of flames
return function (r, w) {
for (var i = 0; i < w.data.length; i += 4) {
w.data[i] = Math.floor((Math.sin(r.data[i])+5)*255);
w.data[i+1] = Math.floor((Math.tan(r.data[i]/8))*255);
w.data[i+2] = Math.floor((Math.sin(r.data[i])));
w.data[i+3] = 255;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment