Advertisement
eriknau

25Days-1

Dec 1st, 2015
81
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(450, 200);
  4.     glc.setDuration(3);
  5.     // glc.setFPS(20);
  6.     // glc.setMode("single");
  7.     // glc.setEasing(false);
  8.     // glc.setMaxColors(256);
  9.     glc.styles.backgroundColor = "black";
  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.     list.addRect({
  18.         fill: true,
  19.         fillStyle: color.rgb(0,0,190),
  20.         x: 425,
  21.         y: 100,
  22.         h: height,
  23.         w: 50,
  24.         shake: [0,5]
  25.     })
  26.  
  27.     list.addSegment({
  28.         strokeStyle: "blue",
  29.         x0: -150,
  30.         y0: Math.random() * height,
  31.         x1: 400,
  32.         y1: Math.random() * height,
  33.         segmentLength: 20,
  34.         lineWidth: 20    
  35.     })
  36.  
  37.     for (var i = 0; i < 50; i++) {
  38.         list.addSegment({
  39.         strokeStyle: color.rgb(Math.random() * 255,0,255),
  40.         x0: -50,
  41.         y0: Math.random() * height,
  42.         x1: 400,
  43.         y1: Math.random() * height,
  44.         segmentLength: 40,
  45.         phase: i*0.003,
  46.         shake: [0,5]
  47.     });
  48. };
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement