eriknau

lines

Dec 5th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //original
  2. function onGLC(glc) {
  3.     glc.loop();
  4.     glc.size(400, 400);
  5.     glc.setDuration(1.5);
  6.     glc.setFPS(22);
  7.     // glc.setMode("single");
  8.     // glc.setEasing(false);
  9.     glc.setMaxColors(256);
  10.     glc.styles.backgroundColor = "black";
  11.     var list = glc.renderList,
  12.         width = glc.w,
  13.         height = glc.h,
  14.         color = glc.color;
  15.     var lmargin = -100,
  16.         topOffset = 5,  
  17.         bottomOffset = 7;
  18.     for (var i = 0; i < width; i++) {
  19.         list.addLine({
  20.             lineWidth: 2,
  21.             strokeStyle: ["brown","magenta"],
  22.             x0: [i*3,i*3-topOffset],
  23.             y0: 0,
  24.             x1: [i*3,i*3+bottomOffset],
  25.             y1: height,
  26.             phase: i*0.02
  27.         })
  28.     };
  29.  
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment