Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(400, 400);
- glc.setDuration(3);
- // glc.setFPS(20);
- // glc.setMode('single');
- // glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- var headY = 50, headX = width/2+30;
- list.addCircle({
- x:headX,
- y:headY,
- radius:30,
- fill: true
- })
- list.addLine({
- x0:headX-5,
- y0:headY+30,
- x1:headX-30,
- y1:headY+130,
- lineWidth:15
- })
- //upper body
- var rotStart = [-40,90],
- rotEnd = [90,-40];
- for(var i = 0; i<2; i++){
- var joint = list.addContainer({
- x: headX,
- y: headY+30,
- rotation: [rotStart[i],rotEnd[i]]
- })
- list.addLine({
- parent: joint,
- x0: 0,
- y0: 0,
- x1: 0,
- y1: 100,
- lineWidth: 3,
- })
- list.addLine({
- parent: joint,
- x0: 0,
- y0: 100,
- x1: 80,
- y1: 50,
- lineWidth: 3,
- })
- list.addCircle({
- parent: joint,
- x: 80,
- y: 50,
- radius: 10
- })
- }
- //lower body
- var legRotStart = [-90,40],
- legRotEnd = [40,-90];
- for(var j = 0; j<2; j++){
- var joint = list.addContainer({
- x: headX-30,
- y: headY+130,
- rotation: [legRotStart[j],legRotEnd[j]]
- })
- list.addLine({
- parent: joint,
- x0: 0,
- y0: 0,
- x1: 0,
- y1: 100,
- lineWidth: 3,
- })
- list.addLine({
- parent: joint,
- x0: 0,
- y0: 100,
- x1: -80,
- y1: 150,
- lineWidth: 3,
- })
- list.addCircle({
- parent: joint,
- x: -80,
- y: 150,
- radius: 10
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment