Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(300, 300);
- glc.setDuration(3);
- // glc.setFPS(20);
- glc.setMode('single');
- glc.setEasing(false);
- glc.setMaxColors(50);
- glc.styles.backgroundColor = "black";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- for(var i = 0; i<180; i++) {
- var rotator = list.addContainer({
- x: width/2,
- y: height/2,
- rotation: [0,360],
- phase: i*0.0028
- })
- list.addLine({
- parent: rotator,
- x0: 0,
- y0: function(t) {
- return 50 + Math.sin(t * Math.PI*50) * 20;
- },
- x1: 0,
- y1: function(t) {
- return 100 + Math.sin(t * Math.PI*50) * 40;
- },
- strokeStyle: "blue",
- lineWidth: 1
- })
- }
- for(var i = 0; i<180; i++) {
- var rotator = list.addContainer({
- x: width/2,
- y: height/2,
- rotation: [-180,180],
- phase: i*0.0028
- })
- list.addLine({
- parent: rotator,
- x0: 0,
- y0: function(t) {
- return 50 + Math.sin(t * Math.PI*50) * 20;
- },
- x1: 0,
- y1: function(t) {
- return 100 + Math.sin(t * Math.PI*50) * 40;
- },
- strokeStyle: "red",
- lineWidth: 1
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment