Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- // glc.size(400, 400);
- glc.setDuration(5);
- // glc.setFPS(20);
- // glc.setMode("single");
- // glc.setEasing(false);
- // glc.setMaxColors(256);
- glc.styles.backgroundColor = "white";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- var rowHeight = 100;
- for (var i = 0; i < height; i+=rowHeight) {
- for (var j = 0; j < width; j+=100) {
- // var x1 = (Math.random()*width)-100;
- list.addRect({
- x: [j,j + Math.random()*width-width/2],
- y: i,
- // w: Math.random()*100+50,
- w: 100,
- h: rowHeight,
- fillStyle: color.hsva(Math.random()*360,1,1,0.4),
- drawFromCenter: false,
- phase: i*0.1
- })
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment