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.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 d = 250,
- num = 40;
- for (var i=0; i<num; i++) {
- list.addBezierCurve({
- x0: function(t){
- return 150 + Math.cos(Math.PI+t*TWO_PI)*d/2;
- },
- y0: function(t) {
- return 150 + Math.sin(Math.PI+t*TWO_PI)*d/2;
- },
- x1: 350+2*i,
- y1: 300+3*i,
- x2: 56,
- y2: 275,
- x3: function(t){
- return ox + Math.cos(t*TWO_PI)*d;
- },
- y3: function(t) {
- return oy + Math.sin(t*TWO_PI)*d;
- },
- lineWidth: 8
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement