Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(300, 300);
- glc.setDuration(2);
- // glc.setFPS(20);
- // glc.setMode('single');
- // glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- var headY = height/2, headX = width*.75;
- var rotStart = 0,
- rotEnd = 180;
- var rotator = list.addContainer({
- x: [headX-100,headX],
- y: headY,
- rotation: [rotStart,rotEnd]
- })
- list.addCircle({
- parent: rotator,
- x:0,
- y:0,
- radius:15,
- fill: true
- })
- list.addLine({
- parent:rotator,
- x0:0,
- y0:0,
- x1:-30,
- y1:70,
- lineWidth:5
- })
- //legs
- var legX1 = [0,-10], legX2 = [-30,-40];
- for(var i = 0; i<2; i++) {
- list.addLine({
- parent: rotator,
- x0: -30,
- y0: 70,
- x1: legX1[i],
- y1: [100,80],
- lineWidth: 2
- })
- list.addLine({
- parent: rotator,
- x0: legX1[i],
- y0: [100,80],
- x1: legX2[i],
- y1: [140,80],
- lineWidth: 2
- })
- list.addCircle({
- parent: rotator,
- x:legX2[i],
- y:[140,80],
- radius:5,
- fill: true
- })
- }
- //arms
- var armX1 = [30,25], armX2 = [45,40];
- for(var i = 0; i<2; i++) {
- var sub_rotator = list.addContainer({
- parent:rotator,
- x:-10,
- y:30,
- rotation: [0,110]
- })
- list.addLine({
- parent: sub_rotator,
- x0: 0,
- y0: 0,
- x1: armX1[i],
- y1: -5,
- lineWidth: 2
- })
- list.addLine({
- parent: sub_rotator,
- x0: armX1[i],
- y0: -5,
- x1: armX2[i],
- y1: -25,
- lineWidth: 2
- })
- list.addCircle({
- parent: sub_rotator,
- x:armX2[i],
- y:-25,
- radius:3,
- fill: true
- })
- }
- }
Add Comment
Please, Sign In to add comment