Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- // glc.size(400, 400);
- glc.setDuration(5);
- // glc.setFPS(20);
- glc.setMode('single');
- glc.setEasing(false);
- glc.styles.backgroundColor = "black";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- var container = list.addContainer({
- x: width / 2,
- y: height / 2,
- rotation: [0, 360]
- });
- var numBoxes = 30,
- rad = 100;
- for(var i = 0; i<numBoxes-2; i++) {
- var newX = Math.cos(2 * Math.PI * i / numBoxes) * rad;
- var newY = Math.sin(2 * Math.PI * i / numBoxes) * rad;
- var rotator = list.addContainer({
- parent: container,
- x: newX,
- y: newY,
- rotation: [360,0]
- })
- var hue = Math.random()*30+200;
- list.addIsobox({
- parent: rotator,
- x: 0,
- y: 0,
- colorTop: color.hsv(hue, 1, 1),
- colorRight: color.hsv(hue, 1, .75),
- colorLeft: color.hsv(hue, 1, .4),
- size: (i+1)*3,
- h: (i+1)*1.9
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment