eriknau

25Days-2

Dec 1st, 2015
122
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(5);
  5.     // glc.setFPS(20);
  6.     // glc.setMode("single");
  7.     glc.setEasing(false);
  8.     // glc.setMaxColors(256);
  9.     glc.styles.backgroundColor = "#452505";
  10.  
  11.     var list = glc.renderList,
  12.         width = glc.w,
  13.         height = glc.h,
  14.         color = glc.color;
  15.  
  16.     // your code goes here:
  17.  
  18.     for (var i = 0; i < 22; i++) {
  19.         list.addSegment({
  20.         strokeStyle: ["blue","red"],
  21.         x0: i * 15 - 100,
  22.         y0: 0,
  23.         x1: i * 15 + 200,
  24.         y1: height,
  25.         segmentLength: 200,
  26.         lineWidth: 5,
  27.         // phase: i*0.005
  28.         });
  29.  
  30.         list.addSegment({
  31.         strokeStyle: ["white","green"],
  32.         x0: i * 15 + 200,
  33.         y0: 0,
  34.         x1: i * 15 - 100,
  35.         y1: height,
  36.         segmentLength: 200,
  37.         lineWidth: 5,
  38.         // phase: i*0.005
  39.         });
  40.     };
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment