Advertisement
eriknau

double lines

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