eriknau

Gif Loop Coder Circles 4

Nov 28th, 2015
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onGLC(glc) {
  2.     glc.loop();
  3.     glc.styles.backgroundColor = "#000";
  4.     // glc.playOnce();
  5.      glc.size(500, 300);
  6.     glc.setDuration(5);
  7.     // glc.setFPS(20);
  8.     // glc.setMode("single");
  9.     // glc.setEasing(false);
  10.     // glc.setMaxColors(20);
  11.     var list = glc.renderList,
  12.         width = glc.w,
  13.         height = glc.h,
  14.         color = glc.color;
  15.  
  16.     for (var i = 0; i < 20; i++) {
  17.             var g = (i+1) * 10;
  18.         list.addCircle({
  19.             x: [110,430],
  20.             y: function(t) {
  21.                return 150 + Math.sin(t * Math.PI) * 40;
  22.            },
  23.             fillStyle: [color.rgba(255, g ,255,0.5),color.rgba(255, g ,0,0.5)],
  24.             phase: i*0.66,
  25.             radius: 150 / (i + 3)
  26.         });
  27.     }
  28.  
  29.     for (var i = 0; i < 20; i++) {
  30.             var g = (i+1) * 10;
  31.         list.addCircle({
  32.             x: [400,100],
  33.             y: function(t) {
  34.                return 80 + Math.sin(t * Math.PI) * 50;
  35.            },
  36.             fillStyle: [color.rgba(g, 255 ,255,0.5),color.rgba(0, g ,255,0.5)],
  37.             phase: i*0.66,
  38.             radius: 150 / (i + 3)
  39.         });
  40.     }  
  41.  
  42.     for (var i = 0; i < 20; i++) {
  43.             var g = (i+1) * 10;
  44.         list.addCircle({
  45.             x: [300,50],
  46.             y: function(t) {
  47.                return 210 + Math.sin(t * Math.PI) * 40;
  48.            },
  49.             fillStyle: [color.rgba(255, 255 ,g,0.5),color.rgba(255, 0 ,g,0.5)],
  50.             phase: i*0.66,
  51.             radius: 150 / (i + 3)
  52.         });
  53.     }  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment