TweenMax操作小狗行走动画效果代码

代码语言:html

所属分类:动画

代码描述:TweenMax操作小狗行走动画效果代码

代码标签: 行走 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Running Dog</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/TweenMax.min.js"></script>
<script type="text/javascript" >
    $(function(){var change_t=0.2
$(".whitedog").click(function(){TM.to(".seg_main",change_t,{fill:"#ddd"})
TM.to(".seg_lf",change_t,{fill:"#bbb"})
TM.to(".skin_main",change_t,{attr:{style:"stop-color:#ddd"}})
TM.to(".skin_shadow",change_t,{attr:{style:"stop-color:#ccc"}})
TM.to(".skin_shadow_dark",change_t,{attr:{style:"stop-color:#bbb"}})
TM.to(".skin_left",change_t,{attr:{style:"stop-color:#bbb"}})
TM.to(".skin_left_dark",change_t,{attr:{style:"stop-color:#ccc"}})
TM.to(".seg",change_t,{fillOpacity:1,strokeWidth:0})
TM.to(".bone",change_t,{opacity:0})
TM.to(".shadow_set",change_t,{attr:{stdDeviation:"10 6"}})
TM.to(".Dog_shadow",change_t,{fillOpacity:0.3,strokeWidth:0})})
$(".blackdog").click(function(){TM.to(".seg_main",change_t,{fill:"#404040"})
TM.to(".seg_lf",change_t,{fill:"#282828"})
TM.to(".skin_main",change_t,{attr:{style:"stop-color:#404040"}})
TM.to(".skin_shadow",change_t,{attr:{style:"stop-color:#303030"}})
TM.to(".skin_shadow_dark",change_t,{attr:{style:"stop-color:#202020"}})
TM.to(".skin_left",change_t,{attr:{style:"stop-color:#282828"}})
TM.to(".skin_left_dark",change_t,{attr:{style:"stop-color:#222"}})
TM.to(".seg",change_t,{fillOpacity:1,strokeWidth:0})
TM.to(".bone",change_t,{opacity:0})
TM.to(".shadow_set",change_t,{attr:{stdDeviation:"10 6"}})
TM.to(".Dog_shadow",change_t,{fillOpacity:0.3,strokeWidth:0})})
$(".showBone").click(function(){TM.to(".seg",change_t,{fillOpacity:0,strokeWidth:0})
TM.to(".bone",change_t,{opacity:1})
TM.to(".shadow_set",change_t,{attr:{stdDeviation:"0"}})
TM.to(".Dog_shadow",change_t,{fillOpacity:0,strokeWidth:0})})
$(".showSeg").click(function(){TM.to(".seg",change_t,{fillOpacity:0,strokeWidth:1})
TM.to(".bone",change_t,{opacity:1})
TM.to(".shadow_set",change_t,{attr:{stdDeviation:"0"}})
TM.to(".Dog_shadow",change_t,{fillOpacity:0,strokeWidth:1,stroke:"#666"})})
$(".x1").click(function(){$(".runningdog").css({transform:"scale(0.5)"})})
$(".x2").click(function(){$(".runningdog").css({transform:"scale(1)"})})
$(".x4").click(function(){$(".runningdog").css({transform:"scale(2)"})})
$(".x8").click(function(){$(".runningdog").css({transform:"scale(4)"})})
$(".toleft").click(function(){$(".RunningdogWrap").css({marginLeft:"+=50px"})})
$(".toright").click(function(){$(".RunningdogWrap").css({marginLeft:"-=50px"})})
$(".totop").click(function(){$(".RunningdogWrap").css({marginTop:"+=50px"})})
$(".tobottom").click(function(){$(".RunningdogWrap").css({marginTop:"-=50px"})})
$(document).keydown(function(event){var keyNum=event.which;var Item=$(".RunningdogWrap");switch(keyNum){case 37:Item.css({marginLeft:'+=50px'});break;case 38:Item.css({marginTop:'+=50px'});break;case 39:Item.css({marginLeft:'-=50px'});break;case 40:Item.css({marginTop:'-=50px'});break;default:break;}})
$(".yawn").click(function(){dog_yawn()})
$(".walk").click(function(){stand2walk()})
$(".stand").click(function(){walk2stand()})
var blink_t=0.1,breathe_t=0.8,TM=TweenMax,g_DogEye_TL=new TimelineMax(),allTL=["g_Dog_TL","g_Fleg_TL","g_Fleg_1_TL","g_FlegL_TL","g_FlegL_1_TL","g_FlegL_2_TL","g_FlegL_3_TL","g_FlegL_4_TL","g_FlegL_5_TL","g_FlegR_TL","g_FlegR_1_TL","g_FlegR_2_TL","g_FlegR_3_TL","g_FlegR_4_TL","g_FlegR_5_TL","g_Hleg_TL","g_Hleg_1_TL","g_HlegL_TL","g_HlegL_1_TL","g_HlegL_2_TL","g_HlegL_3_TL","g_HlegL_4_TL","g_HlegL_5_TL","g_HlegR_TL","g_HlegR_1_TL","g_HlegR_2_TL","g_HlegR_3_TL","g_HlegR_4_TL","g_HlegR_5_TL","g_Tail_TL","g_Tail_1_TL","g_Tail_2_TL","g_Tail_3_TL","g_Tail_4_TL","g_Tail_5_TL","g_Tail_6_TL","g_Tail_7_TL","g_Tail_8_TL","g_Tail_9_TL","g_Tail_10_TL","g_Tail_11_TL","g_Body_TL","g_Body_1_TL","g_Body_2_TL","g_Body_3_TL","g_Body_4_TL","g_Body_5_TL","g_Neck_TL","g_Neck_1_TL","g_Neck_2_TL","g_Neck_3_TL","g_Neck_4_TL","g_DogHead_TL","g_Ear_TL","g_EarL_TL","g_EarL_2_TL","g_EarL_3_TL","g_EarR_TL","g_EarR_2_TL","g_EarR_3_TL","g_Jaw_TL","g_Tongue_TL","g_Tongue_2_TL","g_Tongue_3_TL","g_Tongue_4_TL","g_Tongue_5_TL","g_Tongue_6_TL","ground_TL","Dog_shadow_TL"],allTL_l=allTL.length,TL={};for(var i=0;i<allTL_l;i++){TL[allTL[i]]=new TimelineMax()}
function initTL(myTimeLine){myTimeLine.eventCallback("onStart",null).eventCallback("onComplete",null).eventCallback("onReverseComplete",null).eventCallback("onUpdate",null).eventCallback("onRepeat",null).clear().delay(0).repeat(0).repeatDelay(0).yoyo(false).time(0);}
TM.set(".g_Dog",{x:0,y:-20})
TM.set(".g_Fleg_1",{transformOrigin:"21.53 15.83"})
TM.set(".g_Fleg_2",{transformOrigin:"25.23 14.9"})
TM.set(".g_Fleg_3",{transformOrigin:"17.52 12.72"})
TM.set(".g_Fleg_4",{transformOrigin:"8.43 10.21"})
TM.set(".g_Fleg_5",{transformOrigin:"5.74 7.81"})
TM.set(".g_FlegL_1",{rotation:0})
TM.set(".g_FlegL_2",{rotation:6})
TM.set(".g_FlegL_3",{rotation:-3})
TM.set(".g_FlegL_4",{rotation:-3})
TM.set(".g_FlegL_5",{rotation:0})
TM.set(".g_FlegR_1",{rotation:0})
TM.set(".g_FlegR_2",{rotation:0})
TM.set(".g_FlegR_3",{rotation:0})
TM.set(".g_FlegR_4",{rotation:0})
TM.set(".g_FlegR_5",{rotation:0})
TM.set(".g_Hleg_1",{transformOrigin:"58.83 2.27"})
TM.set(".g_Hleg_2",{transformOrigin:"40.52 38.18"})
TM.set(".g_Hleg_3",{transformOrigin:"50.45 20.63"})
TM.set(".g_Hleg_4",{transformOrigin:"10.32 10.18"})
TM.set(".g_Hleg_5",{transformOrigin:"8.34 9.99"})
TM.set(".g_HlegL_1",{rotation:0})
TM.set(".g_HlegL_2",{rotation:2})
TM.set(".g_HlegL_3",{rotation:4})
TM.set(".g_HlegL_4",{rotation:0})
TM.set(".g_HlegL_5",{rotation:0})
TM.set(".g_HlegR_1",{rotation:0})
TM.set(".g_HlegR_2",{rotation:0})
TM.set(".g_HlegR_3",{rotation:0})
TM.set(".g_HlegR_4",{rotation:0})
TM.set(".g_HlegR_5",{rotation:0})
TM.set(".g_Tail_1",{transformOrigin:"124.58 7.57",rotation:0})
TM.set(".g_Tail_2",{transformOrigin:"90.45 10.94",rotation:0})
TM.set(".g_Tail_3",{transformOrigin:"71.46 8.03",rotation:0})
TM.set(".g_Tail_4",{transformOrigin:"58.53 4.1",rotation:0})
TM.set(".g_Tail_5",{transformOrigin:"51.6 5.09",rotation:0})
TM.set(".g_Tail_6",{transformOrigin:"49.25 4.72",rotation:0})
TM.set(".g_Tail_7",{transformOrigin:"49.25 4.48",rotation:0})
TM.set(".g_Tail_8",{transformOrigin:"49.25 4.92",rotation:0})
TM.set(".g_Tail_9",{transformOrigin:"44.54 4.67",rotation:0})
TM.set(".g_Tail_10",{transformOrigin:"33.95 3.72",rotation:0})
TM.set(".g_Tail_11",{transformOrigin:"18.65 6.35",rotation:0})
TM.set(".g_Body",{transformOrigin:"264.88 134.44",rotation:0})
TM.set(".g_Body_1",{transformOrigin:"264.88 32.93",rotation:0})
TM.set(".g_Body_2",{transformOrigin:"217.80 33.70",rotation:0})
TM.set(".g_Body_3",{transformOrigin:"160.12 28.98",rotation:0})
TM.set(".g_Body_4",{transformOrigin:"109.51 16.04",rotation:0})
TM.set(".g_Body_5",{transformOrigin:"61.25 10.15",rotation:0})
TM.set(".g_Neck_1",{transformOrigin:"26.88 134.44",rotation:0})
TM.set(".g_Neck_2",{transformOrigin:"37.13 115.1",rotation:0})
TM.set(".g_Neck_3",{transformOrigin:"29.74 92.59",rotation:0})
TM.set(".g_Neck_4",{transformOrigin:"23.36 70.07",rotation:0})
TM.set(".g_DogHead",{transformOrigin:"21.43 57.94",rotation:0})
TM.set(".g_EarL",{transformOrigin:"7.58 34.4",rotation:28,x:-2})
TM.set(".g_EarL_2",{transformOrigin:"4.22 21.26",rotation:-8})
TM.set(".g_EarL_3",{transformOrigin:"3.56 17.92",rotation:0})
TM.set(".g_EarR",{transformOrigin:"7.58 34.4",rotation:30,x:-2})
TM.set(".g_EarR_2",{transformOrigin:"4.22 21.26",rotation:0})
TM.set(".g_EarR_3",{transformOrigin:"3.56 17.92",rotation:0})
TM.set(".g_DogEye",{transformOrigin:"5 5.5",rotation:0})
function eyeBlink_r(){var r=Math.round(Math.random()*10)
console.log("眨眼,下次间隔:"+r+"秒")
initTL(g_DogEye_TL)
g_DogEye_TL.to(".g_DogEye",blink_t,{repeat:1,scaleY:0,yoyo:true,delay:r,onComplete:eyeBlink_r})}
TM.set(".g_Jaw",{transformOrigin:"9.18 8.34",rotation:0})
TM.set(".g_Tongue",{transformOrigin:"-0.4 0.03",rotation:8,scaleX:0.9})
TM.set(".g_Tongue_2",{transformOrigin:"3.47 5.55",rotation:4,scaleX:0.93})
TM.set(".g_Tongue_3",{transformOrigin:"2.66 2.63",rotation:0,scaleX:0.96})
TM.set(".g_Tongue_4",{transformOrigin:"2.2 2.44",rotation:0,scaleX:1})
TM.set(".g_Tongue_5",{transformOrigin:"2.4 2.26",rotation:0,scaleX:1})
TM.set(".g_Tongue_6",{transformOrigin:"1.66 2.07",rotation:0,scaleX:1})
TM.set(".Dog_shadow",{transformOrigin:"204.1 9.6",y:-20})
function dog_normal(){console.log("开始正常呼吸状态")
TL.g_Dog_TL.repeat(-1).yoyo(true)
TL.g_Dog_TL.add([TM.to(".g_Body",breathe_t,{x:4.5,y:6}),TM.to(".g_Body_1",breathe_t,{scaleX:1.01,scaleY:1.02,rotation:"+=5"}),TM.to(".g_Body_2",breathe_t,{scaleX:1.01,scaleY:1.01,rotation:"-=1"}),TM.to(".g_Body_3",breathe_t,{scaleY:1.01,rotation:"-=3"}),TM.to(".g_Body_4",breathe_t,{rotation:"-=2"}),TM.to(".g_Body_5",breathe_t,{rotation:"-=1"}),TM.to(".g_Neck_1",breathe_t,{rotation:"-=1"}),TM.to(".g_Neck_2",breathe_t,{rotation:"-=1"}),TM.to(".g_Neck_3",breathe_t,{rotation:"+=1"}),TM.to(".g_Neck_4",breathe_t,{rotation:"+=2"}),TM.to(".g_FlegL_1",breathe_t,{x:5,y:6,rotation:"-=5.0"}),TM.to(".g_FlegL_2",breathe_t,{rotation:"+=15.4"}),TM.to(".g_FlegL_3",breathe_t,{rotation:"-=13.6"}),TM.to(".g_FlegL_4",breathe_t,{rotation:"+=0.6"}),TM.to(".g_FlegL_5",breathe_t,{rotation:"+=3"}),TM.to(".g_FlegR_1",breathe_t,{x:5,y:6,rotation:"-=5.3"}),TM.to(".g_FlegR_2",breathe_t,{rotation:"+=18.2"}),TM.to(".g_FlegR_3",breathe_t,{rotation:"-=18.0"}),TM.to(".g_FlegR_4",breathe_t,{rotation:"+=2.6"}),TM.to(".g_FlegR_5",breathe_t,{rotation:"+=3"}),TM.to(".g_FlegR_4",breathe_t/2,{repeat:1,yoyo:true,y:"-=.2"}),TM.to(".g_FlegR_5",breathe_t/2,{repeat:1,yoyo:true,y:"-=.2"}),TM.to(".g_HlegL_1",breathe_t,{x:1,y:-3,rotation:"-=1"}),TM.to(".g_HlegL_2",breathe_t,{rotation:"+=9"}),TM.to(".g_HlegL_3",breathe_t,{rotation:"-=9.0"}),TM.to(".g_HlegL_4",breathe_t,{rotation:"-=2"}),TM.to(".g_HlegL_5",breathe_t,{rotation:"+=0.5"}),TM.to(".g_HlegR_1",breathe_t,{x:1,y:-3,rotation:"+=1"}),TM.to(".g_HlegR_2",breathe_t,{rotation:"+=6"}),TM.to(".g_HlegR_3",breathe_t,{rotation:"-=9.2"}),TM.to(".g_HlegR_4",breathe_t,{rotation:"-=0"}),TM.to(".g_HlegR_5",breathe_t,{rotation:"+=1.5"}),TM.to(".g_Tail_1",breathe_t,{x:1,y:-3}),TM.to(".g_Tail_2",breathe_t,{rotation:"-=1"}),TM.to(".g_Tail_3",breathe_t,{rotation:"-=.5"}),TM.to(".g_Tail_7",breathe_t,{rotation:"-=5"}),TM.to(".g_Jaw",breathe_t/2,{rotation:"+=2"}),],0,"normal",0)
eyeBlink_r()}
dog_normal()
function dog_yawn(){console.log("打了一个哈欠")
var yawn_t=1;initTL(g_DogEye_TL)
g_DogEye_TL.to(".g_DogEye",blink_t,{delay:yawn_t+0.5,repeat:0,scaleY:0}).to(".g_DogEye",blink_t,{delay:yawn_t,repeat:0,scaleY:1,onComplete:eyeBlink_r})
TL.g_Tongue_TL.repeat(1).yoyo(true)
initTL(TL.g_Dog_TL)
TL.g_Dog_TL.eventCallback("onComplete",initAnimtn)
TL.g_Dog_TL.add([TL.g_Jaw_TL.to(".g_Jaw",yawn_t,{rotation:"+=30"}).to(".g_Jaw",yawn_t/2,{rotation:"+=5"}).to(".g_Jaw",yawn_t,{rotation:"+=10"}).to(".g_Jaw",yawn_t,{rotation:"-=45"}).to(".g_Jaw",yawn_t,{delay:yawn_t/2,rotation:"+=0"}),TL.g_Tongue_TL.add([TM.to(".g_Tongue",yawn_t,{delay:yawn_t/2,rotation:0,scaleX:1.2,ease:Power1.easeOut}),TM.to(".g_Tongue_2",yawn_t,{delay:yawn_t,rotation:-5,scaleX:1.1,ease:Power1.easeOut}),TM.to(".g_Tongue_3",yawn_t,{delay:yawn_t,rotation:-15,scaleX:1.1,ease:Power1.easeOut}),TM.to(".g_Tongue_4",yawn_t,{delay:yawn_t,rotation:-35,scaleX:1.1,ease:Power1.easeOut}),TM.to(".g_Tongue_5",yawn_t,{delay:yawn_t,rotation:-35,scaleX:1,ease:Power1.easeOut}),TM.to(".g_Tongue_6",yawn_t,{delay:yawn_t,rotation:-35,scaleX:1,ease:Power1.easeOut})],0,"normal",0),TL.g_Neck_TL.add([TM.to(".g_DogHead",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,yoyoEase:Power4.easeOut,rotation:"-=15",ease:Power4.easeInOut}),TM.to(".g_Neck_4",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,yoyoEase:Power3.easeOut,rotation:"-=10",ease:Power3.easeInOut}),TM.to(".g_Neck_3",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,yoyoEase:Power2.easeOut,rotation:"-=8",ease:Power2.easeInOut}),TM.to(".g_Neck_2",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,yoyoEase:Power1.easeOut,rotation:"-=5",ease:Power1.easeInOut}),TM.to(".g_Neck_1",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:"-=9",ease:Power1.easeOut}),],0,"normal",0),TM.to(".g_Body",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,x:-2,y:0,ease:Power1.easeOut}),TM.to(".g_Body_1",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,scaleX:1.01,scaleY:1.02,rotation:6.3,ease:Power1.easeOut}),TM.to(".g_Body_2",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,scaleX:1.01,scaleY:1.01,rotation:1.5,ease:Power1.easeOut}),TM.to(".g_Body_3",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,scaleY:1.01,rotation:-14,ease:Power1.easeOut}),TM.to(".body-3",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,attr:{d:"M492.38,428.25c15.05,5.24,35.31,11.8,39.29,18.25c13.17,21.33-0.75,38.52-1.92,43.75c-1.43,6.45-7.7,17.73-22.75,26.37c-5.08,2.91-14.9,5.38-35.5-2.28c-2.91-1.08-18.15-10.15-32.08-11.67c-8-0.87-19.06-5.35-24.3-7.92c-4.25-2.08-8.01-3.32-8.04-11.52c-0.05-14.04,7.23-30.34,9.95-45.46c2.32-12.88,9.25-20.49,32.57-18.68C460.5,419.93,471.29,420.91,492.38,428.25z"}}),TM.to(".g_Body_4",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-14,ease:Power1.easeOut}),TM.to(".g_Body_5",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-10,ease:Power1.easeOut}),TM.to(".body-5",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,attr:{d:"M421.27,420c13.41,8.62,13,34.57,12.48,38.4-1.44,10.54,2.17,37.71-20,35.89-15.53-1.27-33.06,10.86-55.68,3.38-6.94-2.29-22-10.52-23.44-28.72-.72-9.09.34-13.25,2.4-22,6.7-28.74,28-35.59,40.47-36.37C392.83,409.54,407.86,411.34,421.27,420Z"}}),TM.to(".g_FlegR_1",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,x:-2,y:0,rotation:1,ease:Power1.easeOut}),TM.to(".g_FlegR_2",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-2,ease:Power1.easeOut}),TM.to(".g_FlegR_3",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:0.6,ease:Power1.easeOut}),TM.to(".g_FlegR_4",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:0,ease:Power1.easeOut}),TM.to(".g_FlegL_1",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,x:-2,y:0,rotation:0,ease:Power1.easeOut}),TM.to(".g_FlegL_2",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:5,ease:Power1.easeOut}),TM.to(".g_FlegL_3",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-1.4,ease:Power1.easeOut}),TM.to(".g_FlegL_4",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-5,ease:Power1.easeOut}),TM.to(".g_HlegR_1",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,x:-3,y:9,rotation:-10.2,ease:Power1.easeOut}),TM.to(".g_HlegR_2",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-4.2,ease:Power1.easeOut}),TM.to(".g_HlegR_3",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:20.6,ease:Power1.easeOut}),TM.to(".g_HlegR_4",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:1,ease:Power1.easeOut}),TM.to(".g_HlegR_5",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-8,ease:Power1.easeOut}),TM.to(".g_HlegL_1",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,x:-3,y:9,rotation:-8,ease:Power1.easeOut}),TM.to(".g_HlegL_2",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-0.5,ease:Power1.easeOut}),TM.to(".g_HlegL_3",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:21.5,ease:Power1.easeOut}),TM.to(".g_HlegL_4",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-4.1,ease:Power1.easeOut}),TM.to(".g_HlegL_5",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,rotation:-6,ease:Power1.easeOut}),TM.to(".g_Tail_1",yawn_t*2,{repeat:1,repeatDelay:yawn_t,yoyo:true,x:-3,y:9,rotation:-10,ease:Power1.easeOut}),TM.to(".g_Tail_2",yawn_t,{repeat:1,yoyo:true,rotation:0}),TM.to(".g_Tail_3",yawn_t,{repeat:1,yoyo:true,rotation:0}),TM.to(".g_Tail_4",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=3"}),TM.to(".g_Tail_5",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=3"}),TM.to(".g_Tail_6",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=2"}),TM.to(".g_Tail_7",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=2"}),TM.to(".g_Tail_8",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=1"}),TM.to(".g_Tail_9",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=1"}),TM.to(".g_Tail_10",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=0"}),TM.to(".g_Tail_11",yawn_t*1.25,{repeat:3,yoyo:true,rotation:"+=0"}),],0,"normal",0)}
var w_t=1.5;var Ft1=0.14*w_t,Fp1=0,Ft2=0.18*w_t,Fp2=Ft1,Ft3=0.18*w_t,Fp3=Fp2+Ft2,Ft4=0.14*w_t,Fp4=Fp3+Ft3,Ft5=0.18*w_t,Fp5=Fp4+Ft4,Ft6=0.18*w_t,Fp6=Fp5+Ft5;var w_Fleg_1_k0={rotation:-4},w_Fleg_1_k1={rotation:-3},w_Fleg_1_k2={rotation:0},w_Fleg_1_k3={rotation:3},w_Fleg_1_k4={rotation:4},w_Fleg_1_k5={rotation:0},w_Fleg_1_k6={rotation:-4},w_Fleg_2_k0={rotation:-14},w_Fleg_2_k1={rotation:-8},w_Fleg_2_k2={rotation:15},w_Fleg_2_k3={rotation:30},w_Fleg_2_k4={rotation:26},w_Fleg_2_k5={rotation:5},w_Fleg_2_k6=w_Fleg_2_k0,w_Fleg_3_k0={rotation:-16},w_Fleg_3_k1={rotation:-12},w_Fleg_3_k2={rotation:-22},w_Fleg_3_k3={rotation:-20},w_Fleg_3_k4={rotation:2},w_Fleg_3_k5={rotation:-45,ease:Power1.easeOut},w_Fleg_3_k6=w_Fleg_3_k0,w_Fleg_4_k0={rotation:-2},w_Fleg_4_k1={rotation:4},w_Fleg_4_k2={rotation:2},w_Fleg_4_k3={rotation:8},w_Fleg_4_k4={rotation:5},w_Fleg_4_k5={rotation:90,ease:Back.easeOut},w_Fleg_4_k6=w_Fleg_4_k0,w_Fleg_5_k0={rotation:20},w_Fleg_5_k1={rotation:20},w_Fleg_5_k2={rotation:6},w_Fleg_5_k3={rotation:-19},w_Fleg_5_k4={rotation:5},w_Fleg_5_k5={rotation:55},w_Fleg_5_k6=w_Fleg_5_k0
var Ht1=0.18*w_t,Hp1=0,Ht2=0.18*w_t,Hp2=Ht1,Ht3=0.14*w_t,Hp3=Hp2+Ht2,Ht4=0.18*w_t,Hp4=Hp3+Ht3,Ht5=0.18*w_t,Hp5=Hp4+Ht4,Ht6=0.14*w_t,Hp6=Hp5+Ht5;var w_Hleg_1_k0={rotation:-3},w_Hleg_1_k1={rotation:0},w_Hleg_1_k2={rotation:3},w_Hleg_1_k3={rotation:4},w_Hleg_1_k4={rotation:0},w_Hleg_1_k5={rotation:-4},w_Hleg_1_k6=w_Hleg_1_k0,w_Hleg_2_k0={rotation:-20},w_Hleg_2_k1={rotation:-3},w_Hleg_2_k2={rotation:30},w_Hleg_2_k3={rotation:32},w_Hleg_2_k4={rotation:-12},w_Hleg_2_k5={rotation:-17},w_Hleg_2_k6=w_Hleg_2_k0,w_Hleg_3_k0={rotation:13},w_Hleg_3_k1={rotation:11},w_Hleg_3_k2={rotation:-12},w_Hleg_3_k3={rotation:0},w_Hleg_3_k4={rotation:45},w_Hleg_3_k5={rotation:20},w_Hleg_3_k6=w_Hleg_3_k0,w_Hleg_4_k0={rotation:-14},w_Hleg_4_k1={rotation:-13},w_Hleg_4_k2={rotation:-10},w_Hleg_4_k3={rotation:-14},w_Hleg_4_k4={rotation:-30},w_Hleg_4_k5={rotation:-35},w_Hleg_4_k6=w_Hleg_4_k0,w_Hleg_5_k0={rotation:26},w_Hleg_5_k1={rotation:7},w_Hleg_5_k2={rotation:-10},w_Hleg_5_k3={rotation:80},w_Hleg_5_k4={rotation:55},w_Hleg_5_k5={rotation:40},w_Hleg_5_k6=w_Hleg_5_k0
var w_body_k0={x:0,y:15},w_body_k1={x:0,y:15},w_body_k2={x:0,y:5,ease:Power2.easeOut},w_body_k3={x:0,y:15,ease:Power2.easeIn},w_body_1_k0={rotation:0,},w_body_1_k1={rotation:1,ease:Power2.easeOut},w_body_1_k1_1={rotation:0},w_body_1_k2={rotation:-1.7},w_body_1_k2_1={rotation:-2.7},w_body_1_k3={rotation:0,ease:Power1.easeIn},w_body_2_k0={rotation:0},w_body_2_k1={rotation:2},w_body_2_k1_1={rotation:1},w_body_2_k2={rotation:0},w_body_2_k2_1={rotation:-2},w_body_2_k3={rotation:0},w_body_hl_k0={x:0,y:15},w_body_hl_k1={x:0,y:5,ease:Power1.easeOut},w_body_hl_k2={x:0,y:15,ease:Power1.easeIn},w_body_hl_k3={x:0,y:15};function stand2walk(){console.log("过渡到走路循环开始点")
for(var key in TL){initTL(TL[key])}
var s2w_t=Ft2
TL.g_Dog_TL.eventCallback("onComplete",walk)
TL.g_Dog_TL.add([TL.g_FlegL_TL.add([TL.g_FlegL_1_TL.to(".g_FlegL_1",s2w_t,w_Fleg_1_k3),TL.g_FlegL_2_TL.to(".g_FlegL_2",s2w_t,w_Fleg_2_k3),TL.g_FlegL_3_TL.to(".g_FlegL_3",s2w_t,w_Fleg_3_k3),TL.g_FlegL_4_TL.to(".g_FlegL_4",s2w_t,w_Fleg_4_k3),TL.g_FlegL_5_TL.to(".g_FlegL_5",s2w_t,w_Fleg_5_k3)],0,"normal",0).to(".g_FlegL_1",s2w_t,w_body_k0,0),TL.g_FlegR_TL.add([TL.g_FlegR_1_TL.to(".g_FlegR_1",s2w_t/2,w_Fleg_1_k5).to(".g_FlegR_1",s2w_t/2,w_Fleg_1_k0),TL.g_FlegR_2_TL.to(".g_FlegR_2",s2w_t/2,w_Fleg_2_k5).to(".g_FlegR_2",s2w_t/2,w_Fleg_2_k0),TL.g_FlegR_3_TL.to(".g_FlegR_3",s2w_t/2,w_Fleg_3_k5).to(".g_FlegR_3",s2w_t/2,w_Fleg_3_k0),TL.g_FlegR_4_TL.to(".g_FlegR_4",s2w_t/2,w_Fleg_4_k5).to(".g_FlegR_4",s2w_t/2,w_Fleg_4_k0),TL.g_FlegR_5_TL.to(".g_FlegR_5",s2w_t/2,w_Fleg_5_k5).to(".g_FlegR_5",s2w_t/2,w_Fleg_5_k0)],0,"normal",0).to(".g_FlegR_1",s2w_t,w_body_k0,0),TL.g_HlegL_TL.add([TM.to(".g_HlegL_1",s2w_t,w_Hleg_1_k3),TM.to(".g_HlegL_2",s2w_t,w_Hleg_2_k3),TM.to(".g_HlegL_3",s2w_t,w_Hleg_3_k3),TM.to(".g_HlegL_4",s2w_t,w_Hleg_4_k3),TM.to(".g_HlegL_5",s2w_t,w_Hleg_5_k3)],0,"normal",0).to(".g_HlegL_1",s2w_t/2,{x:0,y:1},0).to(".g_HlegL_1",s2w_t/2,w_body_hl_k0,s2w_t/2),TL.g_HlegR_TL.add([TM.to(".g_HlegR_1",s2w_t,w_Hleg_1_k0),TL.g_HlegR_2_TL.to(".g_HlegR_2",s2w_t,w_Hleg_2_k0),TL.g_HlegR_3_TL.to(".g_HlegR_3",s2w_t,w_Hleg_3_k0),TL.g_HlegR_4_TL.to(".g_HlegR_4",s2w_t,w_Hleg_4_k0),TL.g_HlegR_5_TL.to(".g_HlegR_5",s2w_t,w_Hleg_5_k0)],0,"normal",0).to(".g_HlegR_1",s2w_t/2,{x:0,y:1},0).to(".g_HlegR_1",s2w_t/2,w_body_hl_k0,s2w_t/2),TL.g_Body_TL.add([TM.to(".g_Body",s2w_t,{x:0,y:15}),TL.g_Body_1_TL.to(".g_Body_1",s2w_t/2,{rotation:1,x:0,y:0,scaleX:1,scaleY:1}).to(".g_Body_1",s2w_t/2,{rotation:0}),TL.g_Body_2_TL.to(".g_Body_2",s2w_t/2,{rotation:1,x:0,y:0,scaleX:1,scaleY:1}).to(".g_Body_2",s2w_t/2,{rotation:0}),TL.g_Body_3_TL.to(".g_Body_3",s2w_t/2,{rotation:0.5,x:0,y:0,scaleX:1,scaleY:1}).to(".g_Body_3",s2w_t/2,{rotation:0}),TL.g_Body_4_TL.to(".g_Body_4",s2w_t/2,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TL.g_Body_5_TL.to(".g_Body_5",s2w_t/2,{rotation:0,x:0,y:0,scaleX:1,scaleY:1})],0,"normal",0),TL.g_Tail_TL.add([TL.g_Tail_1_TL.to(".g_Tail_1",s2w_t/2,{rotation:0,x:0,y:1,scaleX:1,scaleY:1}).to(".g_Tail_1",s2w_t/2,{rotation:0,y:15}),TM.to(".g_Tail_2",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_3",s2w_t,{rotation:-1,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_4",s2w_t,{rotation:-2,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_5",s2w_t,{rotation:-3,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_6",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_7",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_8",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_9",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_10",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tail_11",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1})],0,"normal",0),TL.g_Neck_TL.add([TL.g_Neck_1_TL.to(".g_Neck_1",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Neck_2",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Neck_3",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Neck_4",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_DogHead",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Jaw",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tongue",s2w_t,{rotation:8,x:0,y:0,scaleX:0.9,scaleY:1}),TM.to(".g_Tongue_2",s2w_t,{rotation:4,x:0,y:0,scaleX:0.93,scaleY:1}),TM.to(".g_Tongue_3",s2w_t,{rotation:0,x:0,y:0,scaleX:0.96,scaleY:1}),TM.to(".g_Tongue_4",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tongue_5",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1}),TM.to(".g_Tongue_6",s2w_t,{rotation:0,x:0,y:0,scaleX:1,scaleY:1})],0,"normal",0),TM.to(".ground",s2w_t,{"stroke-dashoffset":"+=60px"}),TM.to(".Dog_shadow",s2w_t,{scaleX:1.3})],0,"normal",0)}
function walk(){console.log("走起来")
for(var key in TL){initTL(TL[key])}
function FLeg(leg){TL.g_Fleg_1_TL=new TimelineMax().repeat(1)
TL.g_Fleg_TL=new TimelineMax().repeat(-1).add([TL.g_Fleg_1_TL.set(leg+"_1",w_body_k0,0).to(leg+"_1",Ft1,w_body_k1,Fp1).to(leg+"_1",Ft2,w_body_k2,Fp2).to(leg+"_1",Ft3,w_body_k3,Fp3)],0,"normal",0).set(leg+"_1",w_Fleg_1_k0,0).to(leg+"_1",Ft1,w_Fleg_1_k1,Fp1).to(leg+"_1",Ft2,w_Fleg_1_k2,Fp2).to(leg+"_1",Ft3,w_Fleg_1_k3,Fp3).to(leg+"_1",Ft4,w_Fleg_1_k4,Fp4).to(leg+"_1",Ft5,w_Fleg_1_k5,Fp5).to(leg+"_1",Ft6,w_Fleg_1_k6,Fp6).set(leg+"_2",w_Fleg_2_k0,0).to(leg+"_2",Ft1,w_Fleg_2_k1,Fp1).to(leg+"_2",Ft2,w_Fleg_2_k2,Fp2).to(leg+"_2",Ft3,w_Fleg_2_k3,Fp3).to(leg+"_2",Ft4,w_Fleg_2_k4,Fp4).to(leg+"_2",Ft5,w_Fleg_2_k5,Fp5).to(leg+"_2",Ft6,w_Fleg_2_k6,Fp6).set(leg+"_3",w_Fleg_3_k0,0).to(leg+"_3",Ft1,w_Fleg_3_k1,Fp1).to(leg+"_3",Ft2,w_Fleg_3_k2,Fp2).to(leg+"_3",Ft3,w_Fleg_3_k3,Fp3).to(leg+"_3",Ft4,w_Fleg_3_k4,Fp4).to(leg+"_3",Ft5,w_Fleg_3_k5,Fp5).to(leg+"_3",Ft6,w_Fleg_3_k6,Fp6).set(leg+"_4",w_Fleg_4_k0,0).to(leg+"_4",Ft1,w_Fleg_4_k1,Fp1).to(leg+"_4",Ft2,w_Fleg_4_k2,Fp2).to(leg+"_4",Ft3,w_Fleg_4_k3,Fp3).to(leg+"_4",Ft4,w_Fleg_4_k4,Fp4).to(leg+"_4",Ft5,w_Fleg_4_k5,Fp5).to(leg+"_4",Ft6,w_Fleg_4_k6,Fp6).set(leg+"_5",w_Fleg_5_k0,0).to(leg+"_5",Ft1,w_Fleg_5_k1,Fp1).to(leg+"_5",Ft2,w_Fleg_5_k2,Fp2).to(leg+"_5",Ft3,w_Fleg_5_k3,Fp3).to(leg+"_5",Ft4,w_Fleg_5_k4,Fp4).to(leg+"_5",Ft5,w_Fleg_5_k5,Fp5).to(leg+"_5",Ft6,w_Fleg_5_k6,Fp6)
return TL.g_Fleg_TL}
function HLeg(leg){TL.g_Hleg_1_TL=new TimelineMax().repeat(1)
TL.g_Hleg_TL=new TimelineMax().repeat(-1).add([TL.g_Hleg_1_TL.set(leg+"_1",w_body_hl_k0,0).to(leg+"_1",Ht1,w_body_hl_k1,Hp1).to(leg+"_1",Ht2,w_body_hl_k2,Hp2).to(leg+"_1",Ht3,w_body_hl_k3,Hp3)],0,"normal",0).set(leg+"_1",w_Hleg_1_k0,0).to(leg+"_1",Ht1,w_Hleg_1_k1,Hp1).to(leg+"_1",Ht2,w_Hleg_1_k2,Hp2).to(leg+"_1",Ht3,w_Hleg_1_k3,Hp3).to(leg+"_1",Ht4,w_Hleg_1_k4,Hp4).to(leg+"_1",Ht5,w_Hleg_1_k5,Hp5).to(leg+"_1",Ht6,w_Hleg_1_k6,Hp6).set(leg+"_2",w_Hleg_2_k0,0).to(leg+"_2",Ht1,w_Hleg_2_k1,Hp1).to(leg+"_2",Ht2,w_Hleg_2_k2,Hp2).to(leg+"_2",Ht3,w_Hleg_2_k3,Hp3).to(leg+"_2",Ht4,w_Hleg_2_k4,Hp4).to(leg+"_2",Ht5,w_Hleg_2_k5,Hp5).to(leg+"_2",Ht6,w_Hleg_2_k6,Hp6).set(leg+"_3",w_Hleg_3_k0,0).to(leg+"_3",Ht1,w_Hleg_3_k1,Hp1).to(leg+"_3",Ht2,w_Hleg_3_k2,Hp2).to(leg+"_3",Ht3,w_Hleg_3_k3,Hp3).to(leg+"_3",Ht4,w_Hleg_3_k4,Hp4).to(leg+"_3",Ht5,w_Hleg_3_k5,Hp5).to(leg+"_3",Ht6,w_Hleg_3_k6,Hp6).set(leg+"_4",w_Hleg_4_k0,0).to(leg+"_4",Ht1,w_Hleg_4_k1,Hp1).to(leg+"_4",Ht2,w_Hleg_4_k2,Hp2).to(leg+"_4",Ht3,w_Hleg_4_k3,Hp3).to(leg+"_4",Ht4,w_Hleg_4_k4,Hp4).to(leg+"_4",Ht5,w_Hleg_4_k5,Hp5).to(leg+"_4",Ht6,w_Hleg_4_k6,Hp6).set(leg+"_5",w_Hleg_5_k0,0).to(leg+"_5",Ht1,w_Hleg_5_k1,Hp1).to(leg+"_5",Ht2,w_Hleg_5_k2,Hp2).to(leg+"_5",Ht3,w_Hleg_5_k3,Hp3).to(leg+"_5",Ht4,w_Hleg_5_k4,Hp4).to(leg+"_5",Ht5,w_Hleg_5_k5,Hp5).to(leg+"_5",Ht6,w_Hleg_5_k6,Hp6)
return TL.g_Hleg_TL}
function Ear(ear){TL.g_Ear_TL=new TimelineMax().repeat(-1).to(ear,w_t/4,{rotation:"-=5",yoyo:true,repeat:1},0).to(ear+"_2",w_t/4,{rotation:"-=5",yoyo:true,repeat:1},0)
return TL.g_Ear_TL}
TL.g_Dog_TL.add(FLeg(".g_FlegR"),Fp4).add(FLeg(".g_FlegL"),0)
TL.g_Dog_TL.add(HLeg(".g_HlegR"),Hp4).add(HLeg(".g_HlegL"),0)
TL.g_Dog_TL.add([TL.g_Body_TL.repeat(-1).to(".g_Body",Ft1,w_body_k1,Fp1).to(".g_Body",Ft2,w_body_k2,Fp2).to(".g_Body",Ft3,w_body_k3,Fp3).to(".g_Body_1",Ft1,w_body_1_k1,Fp1).to(".g_Body_1",Ht1-Ft1,w_body_1_k1_1,Fp2).to(".g_Body_1",Ft2-(Ht1-Ft1),w_body_1_k2,Hp2).to(".g_Body_1",Ft3-Ht3,w_body_1_k2_1,Fp3).to(".g_Body_1",Ht3,w_body_1_k3,Hp3).to(".g_Body_2",Ft1,w_body_2_k1,Fp1).to(".g_Body_2",Ht1-Ft1,w_body_2_k1_1,Fp2).to(".g_Body_2",Ft2,w_body_2_k2,Fp2).to(".g_Body_2",Ft3-Ht3,w_body_2_k2_1,Fp3).to(".g_Body_2",Ft3,w_body_2_k3,Fp3),TL.g_Tail_TL.repeat(-1).to(".g_Tail_1",Ht1,w_body_hl_k1,Hp1).to(".g_Tail_1",Ht2,w_body_hl_k2,Hp2).to(".g_Tail_1",Ht3,w_body_hl_k3,Hp3).add([TM.to(".g_Tail_1",w_t/4,{rotation:"+=4",yoyo:true,repeat:1}),TM.to(".g_Tail_2",w_t/4,{rotation:"-=5",yoyo:true,repeat:1}),TM.to(".g_Tail_3",w_t/4,{rotation:"+=10",yoyo:true,repeat:1})],0,"normal",0),TL.g_Neck_TL.repeat(-1).add([TM.to(".g_Neck_1",w_t/4,{rotation:"+=5",yoyo:true,repeat:3}),TM.to(".g_Neck_2",w_t/4,{rotation:"-=1",yoyo:true,repeat:3})],0,"normal",0),TL.Dog_shadow_TL.repeat(-1).to(".Dog_shadow",Ft1,{scaleX:1.3}).to(".Dog_shadow",Ft2,{scaleX:1.0}).to(".Dog_shadow",Ft3,{scaleX:1.3})],0,"normal",0)
TL.g_Dog_TL.add(Ear(".g_EarL"),0).add(Ear(".g_EarR"),0)
TL.g_Dog_TL.add(TM.to(".ground",w_t/2,{"stroke-dashoffset":"+=210px",repeat:-1}),Fp4).time(Fp4)}
$(".ft0").click(function(){TL.g_Dog_TL.tweenTo(Ft1+Ft2+Ft3)})
$(".ft1").click(function(){TL.g_Dog_TL.tweenTo(Ft1+Ft2+Ft3+Ft4)})
$(".ft2").click(function(){TL.g_Dog_TL.tweenTo(Ft1+Ft2+Ft3+Ft4+Ft5)})
$(".ft3").click(function(){TL.g_Dog_TL.tweenTo(Ft1+Ft2+Ft3+Ft4+Ft5+Ft6)})
$(".ft4").click(function(){TL.g_Dog_TL.tweenTo(Ft1+Ft2+Ft3+Ft4+Ft5+Ft6+Ft1)})
$(".ft5").click(function(){TL.g_Dog_TL.tweenTo(Ft1+Ft2+Ft3+Ft4+Ft5+Ft6+Ft1+Ft2)})
$(".ft6").click(function(){TL.g_Dog_TL.tweenTo(Ft1+Ft2+Ft3+Ft4+Ft5+Ft6+Ft1+Ft2+Ft3)})
$(".ht0").click(function(){TL.g_Dog_TL.tweenTo(Ht1+Ht2+Ht3)})
$(".ht1").click(function(){TL.g_Dog_TL.tweenTo(Ht1+Ht2+Ht3+Ht4)})
$(".ht2").click(function(){TL.g_Dog_TL.tweenTo(Ht1+Ht2+Ht3+Ht4+Ht5)})
$(".ht3").click(function(){TL.g_Dog_TL.tweenTo(Ht1+Ht2+Ht3+Ht4+Ht5+Ht6)})
$(".ht4").click(function(){TL.g_Dog_TL.tweenTo(Ht1+Ht2+Ht3+Ht4+Ht5+Ht6+Ht1)})
$(".ht5").click(function(){TL.g_Dog_TL.tweenTo(Ht1+Ht2+Ht3+Ht4+Ht5+Ht6+Ht1+Ht2)})
$(".ht6").click(function(){TL.g_Dog_TL.tweenTo(Ht1+Ht2+Ht3+Ht4+Ht5+Ht6+Ht1+Ht2+Ht3)})
var play_i=1
$(".playto").click(function(){play_i++
var n="w2s_p"+play_i
TL.g_Dog_TL.tweenTo(eval(n))})
$(".backto").click(function(){play_i--
var n="w2s_p"+play_i
if(play_i==0){TL.g_Dog_TL.tweenTo(0)
play_i=1}else{TL.g_Dog_TL.tweenTo(eval(n))}})
var w2s_t=1.2*w_t
var w2s_body_f_k1={x:0,y:15},w2s_body_f_k2={x:0,y:5,ease:Power1.easeOut},w2s_body_f_k3={x:0,y:15,ease:Power1.easeIn},w2s_body_f_k4={x:0,y:5,ease:Power1.easeOut},w2s_body_f_k5={x:0,y:0},w2s_body_h_k1={x:0,y:5,ease:Power1.easeOut},w2s_body_h_k2={x:0,y:15,ease:Power1.easeIn},w2s_body_h_k3={x:0,y:15},w2s_body_h_k4={x:0,y:5,ease:Power1.easeOut},w2s_body_h_k5={x:0,y:0},w2s_t1=0.4*w2s_t/5,w2s_t2=w2s_t/5,w2s_t3=w2s_t/5,w2s_t4=w2s_t/5,w2s_t5=1.6*w2s_t/5,w2s_p2=w2s_t1,w2s_p3=w2s_p2+w2s_t2,w2s_p4=w2s_p3+w2s_t3,w2s_p5=w2s_p4+w2s_t4,w2s_p6=w2s_p5+w2s_t5
function walk2stand(){console.log("完整走完最后一个walk循环")
TL.g_Hleg_TL.eventCallback("onRepeat",toStand)
function toStand(){console.log("过渡到站立姿态")
for(var key in TL){initTL(TL[key])}
TL.g_Dog_TL.eventCallback("onComplete",initAnimtn)
TL.g_Dog_TL.add([TL.g_FlegL_TL.add([TL.g_FlegL_1_TL.to(".g_FlegL_1",w2s_t1,{rotation:-3}).to(".g_FlegL_1",w2s_t2,{rotation:0}).to(".g_FlegL_1",w2s_t3,{rotation:3}).to(".g_FlegL_1",w2s_t4,{rotation:2}).to(".g_FlegL_1",w2s_t5,{rotation:0}).to(".g_FlegL_1",w2s_t1,w2s_body_f_k1,0).to(".g_FlegL_1",w2s_t2,w2s_body_f_k2,w2s_p2).to(".g_FlegL_1",w2s_t3,w2s_body_f_k3,w2s_p3).to(".g_FlegL_1",w2s_t4,w2s_body_f_k4,w2s_p4).to(".g_FlegL_1",w2s_t5,w2s_body_f_k5,w2s_p5),TL.g_FlegL_2_TL.to(".g_FlegL_2",w2s_t1,{rotation:-8}).to(".g_FlegL_2",w2s_t2,{rotation:15}).to(".g_FlegL_2",w2s_t3,{rotation:30}).to(".g_FlegL_2",w2s_t4,{rotation:25}).to(".g_FlegL_2",w2s_t5,{rotation:6}),TL.g_FlegL_3_TL.to(".g_FlegL_3",w2s_t1,{rotation:-12}).to(".g_FlegL_3",w2s_t2,{rotation:-22}).to(".g_FlegL_3",w2s_t3,{rotation:-20}).to(".g_FlegL_3",w2s_t4,{rotation:-60,ease:Power1.easeInOut}).to(".g_FlegL_3",w2s_t5,{rotation:-3}),TL.g_FlegL_4_TL.to(".g_FlegL_4",w2s_t1,{rotation:4}).to(".g_FlegL_4",w2s_t2,{rotation:2}).to(".g_FlegL_4",w2s_t3,{rotation:8}).to(".g_FlegL_4",w2s_t4,{rotation:65,ease:Back.easeOut.config(1)}).to(".g_FlegL_4",w2s_t5,{rotation:-3}),TL.g_FlegL_5_TL.to(".g_FlegL_5",w2s_t1,{rotation:20}).to(".g_FlegL_5",w2s_t2,{rotation:6}).to(".g_FlegL_5",w2s_t3,{rotation:-19}).to(".g_FlegL_5",w2s_t4,{rotation:25,ease:Back.easeOut}).to(".g_FlegL_5",w2s_t5,{rotation:0,ease:Power2.easeOut})],0,"normal",0),TL.g_FlegR_TL.add([TL.g_FlegR_1_TL.to(".g_FlegR_1",w2s_t1,{rotation:4}).to(".g_FlegR_1",w2s_t2,{rotation:0}).to(".g_FlegR_1",w2s_t3,{rotation:-1}).to(".g_FlegR_1",w2s_t4,{rotation:0}).to(".g_FlegR_1",w2s_t5,{rotation:0}).to(".g_FlegR_1",w2s_t1,w2s_body_f_k1,0).to(".g_FlegR_1",w2s_t2,w2s_body_f_k2,w2s_p2).to(".g_FlegR_1",w2s_t3,w2s_body_f_k3,w2s_p3).to(".g_FlegR_1",w2s_t4,w2s_body_f_k4,w2s_p4).to(".g_FlegR_1",w2s_t5,w2s_body_f_k5,w2s_p5),TL.g_FlegR_2_TL.to(".g_FlegR_2",w2s_t1,{rotation:26}).to(".g_FlegR_2",w2s_t2,{rotation:24}).to(".g_FlegR_2",w2s_t3,{rotation:-5}).to(".g_FlegR_2",w2s_t4,{rotation:12}).to(".g_FlegR_2",w2s_t5,{rotation:0}),TL.g_FlegR_3_TL.to(".g_FlegR_3",w2s_t1,{rotation:2}).to(".g_FlegR_3",w2s_t2,{rotation:-65,ease:Power1.easeIn}).to(".g_FlegR_3",w2s_t3,{rotation:-18}).to(".g_FlegR_3",w2s_t4,{rotation:-19}).to(".g_FlegR_3",w2s_t5,{rotation:0}),TL.g_FlegR_4_TL.to(".g_FlegR_4",w2s_t1,{rotation:5}).to(".g_FlegR_4",w2s_t2,{rotation:90}).to(".g_FlegR_4",w2s_t3,{rotation:5}).to(".g_FlegR_4",w2s_t4,{rotation:2}).to(".g_FlegR_4",w2s_t5,{rotation:0}),TL.g_FlegR_5_TL.to(".g_FlegR_5",w2s_t1,{rotation:5}).to(".g_FlegR_5",w2s_t2,{rotation:55}).to(".g_FlegR_5",w2s_t3,{rotation:18}).to(".g_FlegR_5",w2s_t4,{rotation:6}).to(".g_FlegR_5",w2s_t5,{rotation:0})],0,"normal",0),TL.g_HlegL_TL.add([TL.g_HlegL_1_TL.to(".g_HlegL_1",w2s_t1,{rotation:0}).to(".g_HlegL_1",w2s_t2,{rotation:3}).to(".g_HlegL_1",w2s_t3,{rotation:4}).to(".g_HlegL_1",w2s_t4,{rotation:0}).to(".g_HlegL_1",w2s_t5,{rotation:0}).to(".g_HlegL_1",w2s_t1,w2s_body_h_k1,0).to(".g_HlegL_1",w2s_t2,w2s_body_h_k2,w2s_p2).to(".g_HlegL_1",w2s_t3,w2s_body_h_k3,w2s_p3).to(".g_HlegL_1",w2s_t4,w2s_body_h_k4,w2s_p4).to(".g_HlegL_1",w2s_t5,w2s_body_h_k5,w2s_p5),TL.g_HlegL_2_TL.to(".g_HlegL_2",w2s_t1,{rotation:-3}).to(".g_HlegL_2",w2s_t2,{rotation:30}).to(".g_HlegL_2",w2s_t3,{rotation:32}).to(".g_HlegL_2",w2s_t4,{rotation:-12}).to(".g_HlegL_2",w2s_t5,{rotation:2}),TL.g_HlegL_3_TL.to(".g_HlegL_3",w2s_t1,{rotation:11}).to(".g_HlegL_3",w2s_t2,{rotation:-12}).to(".g_HlegL_3",w2s_t3,{rotation:0}).to(".g_HlegL_3",w2s_t4,{rotation:45}).to(".g_HlegL_3",w2s_t5,{rotation:4}),TL.g_HlegL_4_TL.to(".g_HlegL_4",w2s_t1,{rotation:-13}).to(".g_HlegL_4",w2s_t2,{rotation:-10}).to(".g_HlegL_4",w2s_t3,{rotation:-14}).to(".g_HlegL_4",w2s_t4,{rotation:-30}).to(".g_HlegL_4",w2s_t5,{rotation:0}),TL.g_HlegL_5_TL.to(".g_HlegL_5",w2s_t1,{rotation:7}).to(".g_HlegL_5",w2s_t2,{rotation:-10}).to(".g_HlegL_5",w2s_t3,{rotation:80}).to(".g_HlegL_5",w2s_t4,{rotation:55}).to(".g_HlegL_5",w2s_t5,{rotation:0})],0,"normal",0),TL.g_HlegR_TL.add([TL.g_HlegR_1_TL.to(".g_HlegR_1",w2s_t1,{rotation:0}).to(".g_HlegR_1",w2s_t2,{rotation:-5}).to(".g_HlegR_1",w2s_t3,{rotation:-4}).to(".g_HlegR_1",w2s_t4,{rotation:0}).to(".g_HlegR_1",w2s_t5,{rotation:0}).to(".g_HlegR_1",w2s_t1,w2s_body_h_k1,0).to(".g_HlegR_1",w2s_t2,w2s_body_h_k2,w2s_p2).to(".g_HlegR_1",w2s_t3,w2s_body_h_k3,w2s_p3).to(".g_HlegR_1",w2s_t4,w2s_body_h_k4,w2s_p4).to(".g_HlegR_1",w2s_t5,w2s_body_h_k5,w2s_p5),TL.g_HlegR_2_TL.to(".g_HlegR_2",w2s_t1,{rotation:-12}).to(".g_HlegR_2",w2s_t2,{rotation:-20}).to(".g_HlegR_2",w2s_t3,{rotation:-17}).to(".g_HlegR_2",w2s_t4,{rotation:-3}).to(".g_HlegR_2",w2s_t5,{rotation:0}),TL.g_HlegR_3_TL.to(".g_HlegR_3",w2s_t1,{rotation:45}).to(".g_HlegR_3",w2s_t2,{rotation:25}).to(".g_HlegR_3",w2s_t3,{rotation:20}).to(".g_HlegR_3",w2s_t4,{rotation:11}).to(".g_HlegR_3",w2s_t5,{rotation:0}),TL.g_HlegR_4_TL.to(".g_HlegR_4",w2s_t1,{rotation:-30}).to(".g_HlegR_4",w2s_t2,{rotation:-35}).to(".g_HlegR_4",w2s_t3,{rotation:-20}).to(".g_HlegR_4",w2s_t4,{rotation:-13}).to(".g_HlegR_4",w2s_t5,{rotation:0}),TL.g_HlegR_5_TL.to(".g_HlegR_5",w2s_t1,{rotation:55}).to(".g_HlegR_5",w2s_t2,{rotation:40}).to(".g_HlegR_5",w2s_t3,{rotation:22}).to(".g_HlegR_5",w2s_t4,{rotation:7}).to(".g_HlegR_5",w2s_t5,{rotation:0})],0,"normal",0),TL.g_Body_TL.to(".g_Body",w2s_t1,{x:0,y:15}).to(".g_Body",w2s_t2,{x:0,y:5}).to(".g_Body",w2s_t3,{x:0,y:15}).to(".g_Body",w2s_t4,{x:0,y:5}).to(".g_Body",w2s_t5,{x:0,y:0}).add([TL.g_Body_1_TL.to(".g_Body_1",w2s_t1,{rotation:1,ease:Power1.easeOut}).to(".g_Body_1",0.5*w2s_t2,{rotation:0}).to(".g_Body_1",0.5*w2s_t2,{rotation:-1}).to(".g_Body_1",w2s_t3,{rotation:0}).to(".g_Body_1",0.5*w2s_t4,{rotation:0}).to(".g_Body_1",0.5*w2s_t4,{rotation:0}).to(".g_Body_1",w2s_t5,{rotation:0}),TL.g_Body_2_TL.to(".g_Body_2",w2s_t1,{rotation:2.2,ease:Power1.easeOut}).to(".g_Body_2",0.5*w2s_t2,{rotation:1}).to(".g_Body_2",0.5*w2s_t2,{rotation:-2.2}).to(".g_Body_2",w2s_t3,{rotation:0}).to(".g_Body_2",0.5*w2s_t4,{rotation:0}).to(".g_Body_2",0.5*w2s_t4,{rotation:0}).to(".g_Body_1",w2s_t5,{rotation:0}),],0,"normal",0),TL.g_Tail_TL.to(".g_Tail_1",w2s_t1,w2s_body_h_k1).to(".g_Tail_1",w2s_t2,w2s_body_h_k2).to(".g_Tail_1",w2s_t3,w2s_body_h_k3).to(".g_Tail_1",w2s_t4,w2s_body_h_k4).to(".g_Tail_1",w2s_t5,w2s_body_h_k5).add([TL.g_Tail_3_TL.to(".g_Tail_3",w2s_t1,{rotation:"+=5"}).to(".g_Tail_3",w2s_t2,{rotation:"-=5"}).to(".g_Tail_3",w2s_t3,{rotation:"+=5"}).to(".g_Tail_3",w2s_t4,{rotation:"-=5"})],0,"normal",0),TL.g_Neck_TL.add([TL.g_Neck_1_TL.to(".g_Neck_1",w2s_t1,{rotat.........完整代码请登录后点击上方下载按钮下载查看

网友评论0