eriknau

25Days-20

Dec 20th, 2015
84
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, 400);
  4.      glc.setDuration(1.5);
  5. //     glc.setFPS(20);
  6.      glc.setMode('single');
  7. //     glc.setEasing(false);
  8.     glc.styles.backgroundColor = "black";
  9.     var list = glc.renderList,
  10.         width = glc.w,
  11.         height = glc.h,
  12.         color = glc.color;
  13.     var rad = 50, shapeHt = rad*0.87, color1 = "green", color2 = "yellow";
  14.  
  15.     for(var i = -shapeHt; i<width+shapeHt;i+=shapeHt*2) {
  16.         for(var j = -rad; j<height+rad; j+=rad*2) {
  17.             list.addStar({
  18.                 x: [j,j+rad],
  19.                 y: [i,i+shapeHt],
  20.                 innerRadius: [rad,rad/2],
  21.                 outerRadius: shapeHt,
  22.                 points: [6,2],
  23.                 fill: true,
  24.                 fillStyle: [color1,color2],
  25.                 stroke: true,
  26.                 lineWidth: 2,
  27.                 //strokeStyle: "black",
  28.                 rotation: [30,90]
  29.             })
  30.         }
  31.     }
  32.    
  33.     for(var k = -shapeHt; k<width+shapeHt;k+=shapeHt*2) {
  34.         for(var l = -rad; l<height+rad; l+=rad*2) {
  35.             list.addStar({
  36.                 x: [l+rad,l+rad*2],
  37.                 y: [k+shapeHt,k+shapeHt*2],
  38.                 innerRadius: [rad/2,rad],
  39.                 outerRadius: shapeHt,
  40.                 points: [2,6],
  41.                 fill: true,
  42.                 fillStyle: [color2,color1],
  43.                 stroke: true,
  44.                 lineWidth: 2,
  45.                 //strokeStyle: "black",
  46.                 rotation: [90,150]
  47.             })
  48.         }
  49.     }
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment