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 = "#2D4059";
- 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 palette = ["#EA5455", "#F07B3F", "#FFD460"],
- step = 10,
- edge = 75;
- for (var x=edge; x<=width-edge; x+=step) {
- var s = Math.floor(Math.random()*3);
- list.addRaySegment({
- x: x,
- y: edge,
- angle: 90,
- length: height-2*edge,
- segmentLength: [50,200],
- lineDash: [30, 10, 40, 10],
- lineWidth: 4,
- lineCap: "butt",
- strokeStyle: palette[s],
- phase: x/200,
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement