Advertisement
xeromino

tri

Dec 1st, 2015
295
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.5);
  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.             color = glc.color,
  14.             ox = width/2,
  15.             oy = height/2,
  16.             TWO_PI = Math.PI*2;
  17.  
  18.     // your code goes here:
  19.  
  20.     var num = 50,
  21.         v = 25,
  22.         even = true;
  23.    
  24.     for (var i=0; i<num; i++) {
  25.         list.addPoly({
  26.             x: [ox-v, ox+v],
  27.             y: oy,
  28.             sides: 3,
  29.             rotation: [30,90],
  30.             fillStyle: even ? "darkred" : "white",
  31.             radius: 180 - i*3.68,
  32.             shadowColor: "rgba(0, 0, 0, 0.35)",
  33.             shadowOffsetX: 5,
  34.             shadowOffsetY: 5,
  35.             shadowBlur: 20,
  36.             phase: i/(num*1)
  37.         });
  38.         if (i%3===0) even =! even;
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement