diff --git a/css/animate.css b/css/animate.css index e5bb134..2d47d60 100644 --- a/css/animate.css +++ b/css/animate.css @@ -511,6 +511,7 @@ transform:scale(1,1); } } +/*荧光棒*/ @keyframes Wobble{ from{ transform:rotate(0deg); @@ -536,6 +537,20 @@ transform-origin:22px 60px; } } +@keyframes stickgo{ + 0{ + transform:rotate(0deg); + top:0px; + } + 50%{ + transform:rotate(1440deg); + top: -150px; + } + 100%{ + transform:rotate(0deg); + top:0px; + } +} /*烟花*/ @keyframes fireworks{ from{ diff --git a/css/style.css b/css/style.css index a85fea6..e2a0067 100644 --- a/css/style.css +++ b/css/style.css @@ -351,8 +351,13 @@ body{ position: absolute; height:81px; width:57px; +} +.stick-swing{ animation: Wobble 2s linear infinite; } +.stick-go{ + animation: stickgo 2s linear infinite; +} .stick.stick-01{ background-image: url(../image/img_11.png); } diff --git a/dancing.html b/dancing.html index 3de0821..91b1a10 100644 --- a/dancing.html +++ b/dancing.html @@ -41,6 +41,7 @@
+
diff --git a/js/custom.js b/js/custom.js index 7defafb..9cf3f9e 100644 --- a/js/custom.js +++ b/js/custom.js @@ -174,7 +174,7 @@ function peopleObj(name,uid,say,action,active_time){
${comment.say}
-
+
${comment.name}
` diff --git a/js/handle.js b/js/handle.js index 1673ad6..50a9d72 100644 --- a/js/handle.js +++ b/js/handle.js @@ -27,6 +27,7 @@ let firTimes = 0; function getEvent(name) { let map = { '烟花':'fireworks', + '剑来':'stickgo', '切歌' : 'change_song', '跳' : 'dancing-down', '向左' : 'dancing-left', @@ -45,6 +46,7 @@ function getEvent(name) { function getLeaderEvent(name) { let map = { '烟花':'fireworks', + '剑来':'stickgo', '切歌' : 'change_song', '一起跳' : 'dancing-down', '一起向左' : 'dancing-left', @@ -146,8 +148,8 @@ function receiveMessage(event) let dataList = JSON.parse(event.data) let data = dataList.dm // 目前硬编码大航海列表 - // let adminList = dataList.admin - adminList = ['流域_墨绿绿']; + let adminList = dataList.admin + // adminList = ['流域_墨绿绿']; // adminList = ['内有猛犬小心']; if (data.length <= 0) { @@ -292,6 +294,20 @@ function receiveMessage(event) },5000) } } + + if(leader.text==="剑来"){ + if(firTimes==0){ + firTimes++; + $('.stick').removeClass('stick-swing'); + $('.stick').addClass('stick-go'); + setTimeout(()=>{ + $('.stick').removeClass('stick-go'); + $('.stick').addClass('stick-swing'); + firTimes = 0; + },6000) + } + } + // 领舞喊一起喊 if (leader.text.length >= 4) { if(leader.text.slice(0,4)=="一起喊:" || leader.text.slice(0,4)=="一起喊:"){