Advertisement
xeromino

twist

Jan 30th, 2016
333
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(35);
  6.     glc.styles.backgroundColor = "#202020";
  7. //     glc.setMode('single');
  8. //     glc.setEasing(false);
  9.     var list = glc.renderList,
  10.         width = glc.w,
  11.         height = glc.h,
  12.         color = glc.color;
  13.  
  14.     // your code goes here:
  15.    
  16.     var w = 300,
  17.         c = 0;
  18.         step = 2;
  19.    
  20.     while( w>0) {
  21.         c++;
  22.         list.addRect({
  23.             x: width / 2,
  24.             y: height / 2,
  25.             w: [5,w],
  26.             h: [w,5],
  27.             fill: true,
  28.             stroke: false,
  29.             strokeStyle: color.rgba(255,255,255,.5),
  30.             fillStyle: color.hsva(200+120/150*c,1,1,1),
  31.             lineWidth:1,
  32.             rotation: [-90+c*4,90+c*2],
  33.             //rotation: [0,180],
  34.             //phase: c/150
  35.             //phase: .5/c,
  36.             phase: Math.sin(w*0.001)
  37.         });
  38.         w -= step;
  39.     }
  40.    
  41.     list.addText({
  42.         x: width-50,
  43.         y: height-15,
  44.         text: "p5art.tumblr.com",
  45.         fontSize: 10,
  46.         fillStyle: color.rgba(255,255,255,.5),
  47.        
  48.     });
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement