Advertisement
xeromino

3d

Dec 14th, 2015
205
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(35);
  7.     glc.setMode("single");
  8.     glc.styles.backgroundColor = "rgba(0,0,0,.3)";
  9.     // glc.setEasing(false);
  10.    
  11.     var list = glc.renderList,
  12.         width = glc.w,
  13.         height = glc.h,
  14.         color = glc.color,
  15.         ox = width/2,
  16.         oy = height/2,
  17.         TWO_PI = Math.PI*2;
  18.  
  19.     // your code goes here:
  20.    
  21.     var num = 30;
  22.  
  23.     for (var i=0; i<num; i++) {
  24.         list.addCube({
  25.             x: ox,
  26.             y: oy,
  27.             z: 100,
  28.             size:[0,300],
  29.             shake:5,
  30.             lineWidth: 1,
  31.             strokeStyle: ["black", "rgba(255,255,255,1)"],
  32.             globalAlpha: [0.7,0],
  33.             rotationX: [0,90],
  34.             rotationY: [0,90],
  35.             rotationZ: [0,180],
  36.             phase: i/num/3
  37.         });
  38.     }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement