eriknau

25Days-9

Dec 8th, 2015
96
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(600, 100);
  4.     glc.setDuration(2);
  5.     // glc.setFPS(20);
  6.     glc.setMode("single");
  7.     // glc.setEasing(false);
  8.     // glc.setMaxColors(256);
  9.     glc.styles.backgroundColor= "red";
  10.  
  11.     var list = glc.renderList,
  12.         width = glc.w,
  13.         height = glc.h,
  14.         color = glc.color;
  15.     var message = "25daysofgifmas";
  16.  
  17.     for (var i = 0; i < message.length; i++) {
  18.             var container = list.addContainer({
  19.                 x: (i+1)*40,
  20.                 y: 60,
  21.                 rotation: [0,360],
  22.                 phase: (message.length-1)-(i+1)*0.02
  23.             })
  24.  
  25.             list.addText({
  26.                 text: message.charAt(i),
  27.                 fontSize: 50,
  28.                 fontFamily: "serif",
  29.                 x: 0,
  30.                 y: -20,
  31.                 stroke:true,
  32.                 strokeStyle: color.randomRGB(),
  33.                 parent: container
  34.             })
  35.     }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment