Advertisement
xeromino

tri

Jan 22nd, 2016
332
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(540, 540);
  4.     glc.setDuration(3);
  5.     glc.setFPS(30);
  6. //     glc.setMode('single');
  7. //     glc.setEasing(false);
  8.     var list = glc.renderList,
  9.         width = glc.w,
  10.         height = glc.h,
  11.         color = glc.color;
  12.  
  13.     // your code goes here:
  14.    
  15.     var num = 5,
  16.         step = width/num;
  17.    
  18.     for (var x=step; x<=width-step; x +=step) {
  19.         for (var y=step; y<=height-step; y +=step) {
  20.             list.addPoly({
  21.                 x: x,
  22.                 y: y,
  23.                 rotation: [45,135],
  24.                 radius: step*.55,
  25.                 sides: 3,
  26.             });
  27.             list.addPoly({
  28.                 x: x,
  29.                 y: y,
  30.                 fillStyle: "white",
  31.                 rotation: [180,360],
  32.                 radius: step*.45,
  33.                 sides: 3
  34.             });
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement