eriknau

25Days-15

Dec 15th, 2015
106
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(500, 400);
  4.     glc.setDuration(5);
  5.     // glc.setFPS(20);
  6.     // glc.setMode("single");
  7.     // glc.setEasing(false);
  8.     // glc.setMaxColors(256);
  9.         glc.styles.backgroundColor = "white";
  10.     var list = glc.renderList,
  11.         width = glc.w,
  12.         height = glc.h,
  13.         color = glc.color;
  14.  
  15.         list.addRect({
  16.             x: 0,
  17.             y: 0,
  18.             w: width,
  19.             h: height,
  20.             fillStyle: color.rgb(100,100,255),
  21.             drawFromCenter: false,
  22.             stroke: false
  23.         })
  24.         for (var i = 0; i < 4; i++) {
  25.             list.addOval({
  26.                 fillStyle: "green",
  27.                 stroke: false,
  28.                 x: (i+1)*100,
  29.                 y: height,
  30.                 rx: 100,
  31.                 ry: 70
  32.             })
  33.         };
  34.         list.addCircle({
  35.             stroke:true,
  36.             fill: false,
  37.             lineWidth:1,
  38.             x:width+220,
  39.             y:100,
  40.             radius:370,
  41.             startAngle: 143,
  42.             endAngle: 190
  43.         })
  44.         for (var i = 0; i < 30; i++) {
  45.             list.addCircle({
  46.                 x: i*12,
  47.                 y: function(t) {
  48.                return 50 + Math.sin(t * Math.PI * 4) * 15;
  49.            },
  50.                 radius: i>0 ? i : i/3,
  51.                 fill: true,
  52.                 fillStyle: color.rgba(i*10,0,0,0.8),
  53.                 stroke: false,
  54.                 phase: i*0.01
  55.             })
  56.         };
  57.         for (var i = 1; i < 7; i++) {
  58.             list.addBezierSegment({
  59.                 strokeStyle: "rgba(255, 255,255,.5)",
  60.                 lineWidth: 1,
  61.                 x0: Math.random()*20+width-20,
  62.                 y0: [Math.random()*200,Math.random()*200],
  63.                 x1: Math.random()*50+width-50,
  64.                 y1: [Math.random()*200,Math.random()*200],
  65.                 x2: Math.random()*200+width-200,
  66.                 y2: [Math.random()*200,Math.random()*200],
  67.                 x3: Math.random()*20,
  68.                 y3: [Math.random()*200,Math.random()*200],
  69.                 percent: 5,
  70.                 phase: i*0.06
  71.             });
  72.         };
  73.         list.addLine({
  74.             x0: 445,
  75.             y0: height-90,
  76.             x1: 445,
  77.             y1: height-40,
  78.             strokeStyle: "tan",
  79.             lineWidth: 2
  80.         })
  81.         list.addLine({
  82.             x0: 445,
  83.             y0: height-70,
  84.             x1: 425,
  85.             y1: height-83,
  86.             strokeStyle: "tan",
  87.             lineWidth: 2
  88.         })
  89.         list.addCircle({
  90.             x: 445,
  91.             y: height-90,
  92.             radius: 10,
  93.             fill: true,
  94.             fillStyle: "tan",
  95.             stroke: false,
  96.         })
  97.  
  98. }
Advertisement
Add Comment
Please, Sign In to add comment