colorful background colors

master
Tezza 2015-02-23 13:59:35 +01:00
parent f6d1df3277
commit ab8ae10713
1 changed files with 8 additions and 1 deletions

View File

@ -2,7 +2,13 @@
* START Trianglify
*/
var t = new Trianglify();
var t = new Trianglify(
{
x_gradient: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"]
}
);
var prevheight = height();
window.onresize = function() {
@ -13,6 +19,7 @@ redraw();
function redraw() {
var pattern = t.generate(document.body.clientWidth, height());
console.log( pattern );
document.body.setAttribute('style', 'background-image: '+pattern.dataUrl);
}