Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(500, 500);
- glc.setDuration(5);
- // glc.setFPS(20);
- // glc.setMode('single');
- //glc.setEasing(false);
- glc.styles.backgroundColor = "#005";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- var numStars = 150;
- var container = list.addContainer({
- x: width / 2,
- y: height / 2,
- rotation: [0, 30]
- });
- for(var i = 0; i<numStars; i++) {
- x= Math.cos(2 * Math.PI * i / numStars) * 100;
- y= Math.sin(2 * Math.PI * i / numStars) * 100;
- var subContainer = list.addContainer({
- x: x,
- y: y,
- parent: container,
- rotation: [0,360],
- phase: i*0.01
- })
- x= Math.cos(2 * Math.PI * i / numStars) * 30;
- y= Math.sin(2 * Math.PI * i / numStars) * 30;
- list.addStar({
- x: x,
- y: y,
- fill: true,
- fillStyle: glc.color.rgb(255,0,0),
- stroke: true,
- strokeStyle: glc.color.rgb(100,0,100),
- lineWidth: 3,
- outerRadius: 50,
- innerRadius: 25,
- points: 5,
- rotation: [0, 360],
- parent:subContainer,
- phase: i*0.001
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment