更新翅膀,压缩图片
|
@ -321,6 +321,11 @@ body{
|
|||
position: absolute;
|
||||
/* display: inline-flex; */
|
||||
}
|
||||
.dance-people .people-dancins{
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
position: relative;
|
||||
}
|
||||
.dance-people .people-img{
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
|
@ -404,11 +409,15 @@ body{
|
|||
width: 200px;
|
||||
height: 128px;
|
||||
content: "";
|
||||
left:-50%;
|
||||
top: 0px;
|
||||
left:-55%;
|
||||
top: -10px;
|
||||
position: absolute;
|
||||
display: none;
|
||||
z-index: -8;
|
||||
}
|
||||
.dance-people .people-wing.people-block{
|
||||
display: block;
|
||||
}
|
||||
/*荧光棒*/
|
||||
.stick{
|
||||
background-size: 57px 81px;
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<!--小纸片氛围js-->
|
||||
<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
||||
<!-- <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script> -->
|
||||
<!--小纸片氛围js-->
|
||||
<!--视频灯光-->
|
||||
<div class="video-bg">
|
||||
|
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 33 KiB |
BIN
image/img_01.png
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 83 KiB |
BIN
image/img_02.png
Before Width: | Height: | Size: 602 KiB After Width: | Height: | Size: 538 KiB |
BIN
image/img_04.png
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 12 KiB |
BIN
image/img_05.png
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 6.9 KiB |
BIN
image/img_06.png
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.3 KiB |
BIN
image/img_07.png
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.5 KiB |
BIN
image/img_08.png
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.4 KiB |
BIN
image/img_09.png
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 7.7 KiB |
BIN
image/img_0x.png
Before Width: | Height: | Size: 370 KiB After Width: | Height: | Size: 362 KiB |
BIN
image/img_10.png
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.2 KiB |
BIN
image/img_11.png
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
image/img_12.png
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
image/img_13.png
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
image/img_14.png
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
image/img_15.png
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
image/img_16.png
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
image/img_17.png
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 6.0 KiB |
32
js/custom.js
|
@ -32,25 +32,25 @@ var fluoTime = 6000//默认6秒关闭
|
|||
function allDancing(dangcing){
|
||||
if(dangcing!=''){
|
||||
actionArr.forEach((item,index)=>{
|
||||
var haveDan = $(`.people-img`).is(`.${item}`);
|
||||
var haveDan = $(`.people-dancins`).is(`.${item}`);
|
||||
if(haveDan){
|
||||
$(`.people-img`).removeClass(item);
|
||||
$(`.people-dancins`).removeClass(item);
|
||||
// $(`.people-img`).addClass(actionArr[Math.floor(Math.random()*actionArr.length)]);
|
||||
$(`.people-img`).addClass(dangcing);
|
||||
$(`.people-dancins`).addClass(dangcing);
|
||||
$(`.leading-dancer`).removeClass(item);
|
||||
$(`.leading-dancer`).addClass(dangcing);
|
||||
}
|
||||
})
|
||||
setTimeout(()=>{
|
||||
startIndex = 0;
|
||||
var allPeople = $('.dance-floor').find('.people-img').length;
|
||||
$(`.people-img`).removeClass(dangcing);
|
||||
var allPeople = $('.dance-floor').find('.people-dancins').length;
|
||||
$(`.people-dancins`).removeClass(dangcing);
|
||||
var suiDanTimer = setInterval(()=>{
|
||||
if(startIndex==allPeople){
|
||||
clearInterval(suiDanTimer);
|
||||
} else {
|
||||
startIndex++;
|
||||
$(`.data${startIndex} .people-img`).addClass(actionArr[Math.floor(Math.random()*actionArr.length)]);
|
||||
$(`.data${startIndex} .people-dancins`).addClass(actionArr[Math.floor(Math.random()*actionArr.length)]);
|
||||
}
|
||||
},3000)
|
||||
},10000)
|
||||
|
@ -58,7 +58,7 @@ function allDancing(dangcing){
|
|||
}
|
||||
// 创建人物时随机分配舞蹈
|
||||
function randomDancing(id){
|
||||
$(`.data${id} .people-img`).addClass(actionArr[Math.floor(Math.random()*actionArr.length)]);
|
||||
$(`.data${id} .people-dancins`).addClass(actionArr[Math.floor(Math.random()*actionArr.length)]);
|
||||
}
|
||||
// 荧光棒动画事件
|
||||
function fluoEv(id,fluoEvent){
|
||||
|
@ -70,12 +70,12 @@ function fluoEv(id,fluoEvent){
|
|||
// 个人动作舞
|
||||
function peopleAction(id,aevent){
|
||||
actionArr.forEach((item,index)=>{
|
||||
var haveDan = $(`#${id} .people-img`).is(`.${item}`);
|
||||
var haveDan = $(`#${id} .people-dancins`).is(`.${item}`);
|
||||
if(haveDan){
|
||||
$(`#${id} .people-img`).removeClass(item);
|
||||
$(`#${id} .people-img`).addClass(aevent);
|
||||
$(`#${id} .people-dancins`).removeClass(item);
|
||||
$(`#${id} .people-dancins`).addClass(aevent);
|
||||
} else {
|
||||
$(`#${id} .people-img`).addClass(aevent);
|
||||
$(`#${id} .people-dancins`).addClass(aevent);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -152,8 +152,8 @@ function peopleObj(name,uid,say,action,active_time, is_admin, decoration){
|
|||
}
|
||||
|
||||
// 添加翅膀
|
||||
if (decoration.indexOf('big-wing') != -1) {
|
||||
decorationWing = 'big-wing'
|
||||
if (decoration.indexOf('people-wing') != -1) {
|
||||
decorationWing = 'people-wing'
|
||||
// console.log(decorationWing, '我的翅膀')
|
||||
}
|
||||
}
|
||||
|
@ -166,13 +166,17 @@ function peopleObj(name,uid,say,action,active_time, is_admin, decoration){
|
|||
yspHtml += `
|
||||
<div id="${comment.uid}" data-time="${comment.active_time}" class="dance-people ${decorationWing} data${peopleId}" style="top: ${comment.top}; left: ${comment.left};">
|
||||
<div class="speak ">${comment.say}</div>
|
||||
<div class="people-img ${comment.peopleImg} ${comment.dancin} ${decorationHat} ">
|
||||
<div class="people-dancins ${comment.dancin} ">
|
||||
<div class="people-img ${comment.peopleImg} ${decorationHat} ">
|
||||
<div class="stick stick-swing ${decorationStick} ${bigStick} ${comment.ying_guang}"></div>
|
||||
<div class="people-name ">${comment.name}</div>
|
||||
</div>
|
||||
<div class="people-wing "> </div>
|
||||
</div>
|
||||
</div>`
|
||||
});//如果是舰长需要加上stick-swing-big-tow,充值用户加上stick-christmas,同时去掉stick-swing-big-tow
|
||||
//增加圣诞帽子,在people-img那层增加people-hat。
|
||||
//翅膀在people-wing 增加people-block
|
||||
$('.dance-floor').prepend(yspHtml);
|
||||
moveEv(uid);
|
||||
// 随机舞
|
||||
|
|
16
js/handle.js
|
@ -11,7 +11,7 @@ let autoDel = false
|
|||
let virtualPeople = true
|
||||
|
||||
// 虚拟人物数量
|
||||
let virtualNum = 0
|
||||
let virtualNum = 50
|
||||
|
||||
// 虚拟人物名字列表
|
||||
let virtualList = ['一只小绵飏','未来狗头耀武扬威什么','大牛逼玩意','长呆毛的呆猫','区实验川大聪明',
|
||||
|
@ -30,7 +30,7 @@ let virtualWordList = ['哈哈哈', '我又来了!', '大爷闪亮登场', '真
|
|||
|
||||
// 礼物所需电池
|
||||
let giftObj = {
|
||||
'小心心': 1,
|
||||
'小心心': 9999,
|
||||
'粉丝团灯牌': 1,
|
||||
'牛哇牛哇': 1,
|
||||
'白银宝盒': 10,
|
||||
|
@ -227,7 +227,7 @@ function receiveMessage(event)
|
|||
// 送礼物列表
|
||||
let giftList = dataList.gift
|
||||
|
||||
// console.log(giftList, '获取的礼物列表')
|
||||
console.log(giftList, '获取的礼物列表')
|
||||
if (giftList.length > 0) {
|
||||
updateUserCell(giftList)
|
||||
console.log(userCell, '用户电池记录')
|
||||
|
@ -307,10 +307,8 @@ function receiveMessage(event)
|
|||
|
||||
// 99个电池送大翅膀一对
|
||||
if (userCellNum >= 99) {
|
||||
decoration.push('big-wing')
|
||||
decoration.push('people-block')
|
||||
}
|
||||
|
||||
console.log(dm.uname+' 有充值用户发言了', 'sssss')
|
||||
}
|
||||
|
||||
// 新用户
|
||||
|
@ -341,8 +339,8 @@ function receiveMessage(event)
|
|||
}
|
||||
|
||||
// 添加翅膀
|
||||
if (decoration.indexOf('big-wing') != -1) {
|
||||
$(`#${dm.uid} .dance-people`).removeClass("big-wing").addClass('big-wing');
|
||||
if (decoration.indexOf('people-block') != -1) {
|
||||
$(`#${dm.uid} .dance-people .people-wing`).removeClass("people-block").addClass('people-block');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -483,7 +481,7 @@ function updateUserCell(list) {
|
|||
if (giftCellNum != undefined) {
|
||||
cell = giftCellNum * item.num
|
||||
}
|
||||
console.log(item.uname + ' -- '+item.gift+ ' num:'+item.num + ' cell='+cell, '礼物信息')
|
||||
// console.log(item.uname + ' -- '+item.gift+ ' num:'+item.num + ' cell='+cell, '礼物信息')
|
||||
if (cell > 0) {
|
||||
if (userCell[item.uname] == undefined) {
|
||||
userCell[item.uname] = cell
|
||||
|
|