Advertisement
xeromino

octoShake

Dec 1st, 2015
311
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(3);
  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.  
  17.     // your code goes here:
  18.  
  19.     var n = 20;
  20.    
  21.         for (var i=0; i<n; i++) {
  22.             list.addPoly({
  23.                 x: width/2,
  24.                 y: height/2,
  25.                 radius: [width*.2, width*.4],
  26.                 sides: [3,8],
  27.                 rotation: [90,270],
  28.                 fillStyle: "white",
  29.                 phase: 0.15/n*i,
  30.                 shake: 5,
  31.                 shadowColor: "rgba(0, 0, 0, 0.50)",
  32.                 shadowOffsetX: 5,
  33.                 shadowOffsetY: 5,
  34.                 shadowBlur: 20
  35.             });
  36.         }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement