Advertisement
xeromino

split1

Nov 21st, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onGLC(glc) {
  2.     glc.loop();
  3.     // glc.playOnce();
  4.     glc.size(540, 540);
  5.     glc.setDuration(2);
  6.     glc.setFPS(30);
  7.     glc.setMode("single");
  8.     // glc.setEasing(false);
  9.    
  10.     var list = glc.renderList,
  11.         width = glc.w,
  12.         height = glc.h;
  13.  
  14.     // your code goes here:
  15.     var rad = 50;
  16.  
  17.     list.addCircle({
  18.         x: width/2,
  19.         y: height/2,
  20.         radius: [0,rad]
  21.     });
  22.    
  23.     var TWO_PI = Math.PI*2;
  24.     var d = width*.75;
  25.     var num = 10;
  26.     var col1 = "rgba(0,0,0,.7)" , col2 = "darkred" ;
  27.    
  28.     for (var i=0; i<num; i++){
  29.         var destX = width/2 + Math.cos(TWO_PI/num*i)*d;
  30.         var destY = height/2 + Math.sin(TWO_PI/num*i)*d;
  31.         list.addCircle({
  32.             x: [width/2, destX],
  33.             y: [height/2, destY],
  34.             radius: [rad,5],
  35.             fillStyle: [col1, col2]
  36.         });
  37.     }
  38.    
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement