Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.styles.backgroundColor = "#000000";
- // glc.playOnce();
- // glc.size(400, 400);
- glc.setDuration(5);
- // glc.setFPS(20);
- glc.setMode("bounce");
- // glc.setEasing(false);
- // glc.setMaxColors(256);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h;
- var num = 22;
- for (var i = num; i > 0; i--) {
- list.addPoly({
- x: function(t) {
- return 250 + Math.sin(t * Math.PI * 4) * 50;
- },
- y: [300,100],
- stroke: true,
- strokeStyle: "#ff0000",
- lineWidth: 2,
- radius: 4*(i+1),
- sides: 6,
- phase: 0.01*i
- })
- };
- for (var i = num; i > 0; i--) {
- list.addPoly({
- x: function(t) {
- return 150 + Math.sin(t * Math.PI * 2) * 100;
- },
- y: [250,350],
- stroke: true,
- strokeStyle: "#ff0000",
- lineWidth: 2,
- radius: 2*(i+1),
- sides: 6,
- phase: 0.02*i
- })
- };
- for (var i = num; i > 0; i--) {
- list.addPoly({
- x: function(t) {
- return 100 + Math.sin(t * Math.PI * 1) * 100;
- },
- y: [50,250],
- stroke: true,
- strokeStyle: "#ff0000",
- lineWidth: 2,
- radius: 2*(i+1),
- sides: 6,
- phase: 0.01*i
- })
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment