Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- // glc.playOnce();
- glc.size(540, 540);
- glc.setDuration(2);
- glc.setFPS(30);
- glc.styles.backgroundColor = "black";
- // glc.setMode("single");
- // glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color,
- ox = width/2,
- oy = height/2,
- TWO_PI = Math.PI*2;
- // your code goes here:
- var num = 25,
- palette = ["#2D4059", "#EA5455", "#F07B3F", "#FFD460"];
- for (var i=0; i<num; i++) {
- var edge = 150,
- s = Math.floor(Math.random()*4),
- y = edge + (height-edge*2)/num*i;
- list.addLine({
- x0: edge,
- y0: y,
- x1: width-edge,
- y1: y,
- lineWidth: [1,8],
- strokeStyle: palette[s],
- lineCap: "butt",
- phase: i/num,
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement