Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(400, 250);
- glc.setDuration(1);
- // glc.setFPS(25);
- // glc.setMode('single');
- // glc.setEasing(false);
- // glc.setMaxColors(80);
- glc.styles.backgroundColor = "white";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- list.addRect({
- x: 0,
- y: 0,
- w: width,
- h: height,
- drawFromCenter: false,
- fillStyle: "lavender"
- })
- list.addRect({
- x: 0,
- y: 150,
- w: width,
- h: 100,
- drawFromCenter: false,
- fillStyle: "green"
- })
- for(var i =1; i<11; i++) {
- var yposStart = 100,
- yposEnd = yposStart;
- var jumper = list.addContainer({
- x: i*35,
- y: [yposStart,yposEnd],
- phase: i*0.03
- })
- list.addCircle({
- parent: jumper,
- x: 0,
- y: 0,
- radius: 10,
- fill: true
- })
- list.addLine({
- parent: jumper,
- x0: 0,
- y0: 0,
- x1: 0,
- y1: 60,
- lineWidth: 3
- })
- list.addLine({
- parent: jumper,
- x0: 0,
- y0: 60,
- x1: -10,
- y1: 120,
- lineWidth: 2
- })
- list.addLine({
- parent: jumper,
- x0: 0,
- y0: 60,
- x1: 10,
- y1: 120,
- lineWidth: 2
- })
- var lArm = list.addContainer({
- parent: jumper,
- x: 0,
- y: 15,
- rotation: [0,140]
- })
- var rArm = list.addContainer({
- parent: jumper,
- x: 0,
- y: 15,
- rotation: [0,-140]
- })
- list.addLine({
- parent: lArm,
- x0: 0,
- y0: 0,
- x1: -5,
- y1: 45,
- lineWidth: 2
- })
- list.addLine({
- parent: rArm,
- x0: 0,
- y0: 0,
- x1: 5,
- y1: 45,
- lineWidth: 2
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement