Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.styles.backgroundColor = "#000";
- // glc.playOnce();
- glc.size(500, 300);
- glc.setDuration(5);
- // glc.setFPS(20);
- // glc.setMode("single");
- // glc.setEasing(false);
- // glc.setMaxColors(20);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- for (var i = 0; i < 20; i++) {
- var g = (i+1) * 10;
- list.addCircle({
- x: [110,430],
- y: function(t) {
- return 150 + Math.sin(t * Math.PI) * 40;
- },
- fillStyle: [color.rgba(255, g ,255,0.5),color.rgba(255, g ,0,0.5)],
- phase: i*0.66,
- radius: 150 / (i + 3)
- });
- }
- for (var i = 0; i < 20; i++) {
- var g = (i+1) * 10;
- list.addCircle({
- x: [400,100],
- y: function(t) {
- return 80 + Math.sin(t * Math.PI) * 50;
- },
- fillStyle: [color.rgba(g, 255 ,255,0.5),color.rgba(0, g ,255,0.5)],
- phase: i*0.66,
- radius: 150 / (i + 3)
- });
- }
- for (var i = 0; i < 20; i++) {
- var g = (i+1) * 10;
- list.addCircle({
- x: [300,50],
- y: function(t) {
- return 210 + Math.sin(t * Math.PI) * 40;
- },
- fillStyle: [color.rgba(255, 255 ,g,0.5),color.rgba(255, 0 ,g,0.5)],
- phase: i*0.66,
- radius: 150 / (i + 3)
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment