新增间隔镜头

master
chen 2021-12-13 13:29:13 +08:00
commit 58e034d7c1
27 changed files with 316 additions and 39 deletions

View File

@ -321,15 +321,21 @@ body{
position: absolute;
/* display: inline-flex; */
}
.dance-people .people-dancins{
width: 90px;
height: 90px;
position: relative;
}
.dance-people .people-img{
width: 90px;
height: 90px;
background-size: 90px 90px;
background-repeat: no-repeat;
background-repeat: no-repeat;
padding-top: 90px;
position: relative;
filter:drop-shadow(10px 30px 10px rgba(0,0,0,.4));
}
/**/
.dance-people .people-img01{
background-image: url(../image/img_05.png);
}
@ -355,6 +361,63 @@ body{
-webkit-text-stroke: 0.5px black;
text-align: center;
}
/*圣诞帽子*/
.dance-people .people-hat::after{
background: url(../image/icon_05.png) no-repeat;
background-size: 65px 33px;
width: 65px;
height: 33px;
content: "";
left:12px;
top: 0px;
z-index: 2;
position: absolute;
}
.dance-people .people-img01.people-hat::after{
left:19px;
top: -14px;
}
.dance-people .people-img02.people-hat::after{
left:19px;
top: 0px;
}
.dance-people .people-img03.people-hat::after{
left:11px;
top: 0px;
}
.dance-people .people-img03.people-hat::after{
left:11px;
top: 0px;
}
.dance-people .people-img04.people-hat::after{
left:2px;
top: 0px;
}
.dance-people .people-img05.people-hat::after{
left:18px;
top: 0px;
}
.dance-people .people-img06.people-hat::after{
left:15px;
top: 0px;
}
/*翅膀*/
.dance-people .people-wing{
background: url(../image/icon_06.png) no-repeat;
background-size: 200px 118px;
width: 200px;
height: 118px;
content: "";
left:-55%;
top: -10px;
position: absolute;
display: none;
z-index: -8;
}
.dance-people .people-wing.people-block{
display: block;
}
/*荧光棒*/
.stick{
background-size: 57px 81px;
@ -362,6 +425,7 @@ body{
position: absolute;
height:81px;
width:57px;
z-index: 3;
}
.stick-swing{
@ -370,7 +434,7 @@ body{
.stick-swing-big{
animation: Wobble-big 2s linear infinite;
}
.stick-swing-big-tow {
.stick-swing-big-tow,.stick-christmas{
animation: Wobble-big-tow 2s linear infinite;
}
.stick-go{
@ -394,6 +458,10 @@ body{
.stick.stick-06{
background-image: url(../image/img_16.png);
}
/*圣诞树*/
.stick.stick-christmas{
background-image: url(../image/img_17.png);
}
/*荧光棒定位*/
.dance-people .people-img01 .stick{
top: 14px;
@ -420,7 +488,7 @@ body{
right: -15px;
}
/*大荧光棒*/
.stick.stick-swing-big,.stick.stick-swing-big-tow{
.stick.stick-swing-big,.stick.stick-swing-big-tow,.stick.stick-christmas{
background-size: 114px 162px;
background-repeat: no-repeat;
width: 114px ;
@ -430,27 +498,33 @@ body{
top: -70px;
right: -70px;
}
.dance-people .people-img01 .stick.stick-swing-big-tow{
.dance-people .people-img01 .stick.stick-swing-big-tow
,.dance-people .people-img01 .stick.stick-christmas{
top: -43px;
right: -40px;
}
.dance-people .people-img02 .stick.stick-swing-big-tow{
.dance-people .people-img02 .stick.stick-swing-big-tow
,.dance-people .people-img02 .stick.stick-christmas{
top: -61px;
right: 0px;
}
.dance-people .people-img03 .stick.stick-swing-big-tow{
.dance-people .people-img03 .stick.stick-swing-big-tow
,.dance-people .people-img03 .stick.stick-christmas{
top: -67px;
right: -57px;
}
.dance-people .people-img04 .stick.stick-swing-big-tow{
.dance-people .people-img04 .stick.stick-swing-big-tow
,.dance-people .people-img04 .stick.stick-christmas{
top: -57px;
right: -50px;
}
.dance-people .people-img05 .stick.stick-swing-big-tow{
.dance-people .people-img05 .stick.stick-swing-big-tow
,.dance-people .people-img05 .stick.stick-christmas{
top: -68px;
right: -55px;
}
.dance-people .people-img06 .stick.stick-swing-big-tow{
.dance-people .people-img06 .stick.stick-swing-big-tow
,.dance-people .people-img06 .stick.stick-christmas{
top: -55px;
right: -10px;
}

View File

@ -25,15 +25,15 @@
<video id="mousedown" loop autoplay muted src="image/vd.mp4" ></video>
</div>
<!--音乐-->
<audio id="music" data-song="顶级 Slow 气派炸街5.0.mp3" controls autoplay loop style="z-index: 999; position: fixed;display: none;">
<source src="https://bili.scdxtc.cn/music/顶级 Slow 气派炸街5.0.mp3" type="audio/mp3">
</audio>
<!-- <audio id="music" data-song="" controls autoplay loop style="z-index: 999; position: fixed;display: none;">
<source src="" type="audio/mp3">
</audio> -->
<!--点击播放音乐-->
<script>
<!-- <script>
document.body.addEventListener('mousedown', function(){
$('#music')[0].play()
}, false);
</script>
</script> -->
<!---->
<div class="sound">
<img src="image/icon_02.png" />
@ -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">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 494 B

BIN
image/icon_05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
image/icon_06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 KiB

After

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 KiB

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
image/img_17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -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);
}
})
}
@ -114,7 +114,8 @@ function exitEv(id){
$(`${id}`).remove();
}
// 进入广场
function peopleObj(name,uid,say,action,active_time, is_admin){
function peopleObj(name,uid,say,action,active_time, is_admin, decoration){
// console.log(name + ' ' + uid + ' ' + say + ' ' + action + ' ' + active_time + ' ' + is_admin, 'sssss')
let yspHtml = '';
let yspData = [
{
@ -131,17 +132,51 @@ function peopleObj(name,uid,say,action,active_time, is_admin){
is_admin: is_admin
}
]
let decorationHat = ''
let decorationStick = ''
let decorationWing = ''
if (decoration != undefined && decoration.length > 0) {
// console.log(decoration, '装饰品')
// console.log(decoration.indexOf('people-hat'), '是否有帽子')
// 添加帽子
if (decoration.indexOf('people-hat') != -1) {
decorationHat = 'people-hat'
// console.log(decorationHat, '我的帽子')
}
// 添加棒子
if (decoration.indexOf('stick-christmas') != -1) {
decorationStick = 'stick-christmas'
// console.log(decorationStick, '我的棒子')
}
// 添加翅膀
if (decoration.indexOf('people-block') != -1) {
decorationWing = 'people-block'
// console.log(decorationWing, '我的翅膀')
}
}
$.each(yspData, function (commentIndex, comment) {
let bigStick = comment.is_admin == 1 ? 'stick-swing-big-tow' : ''
if (decorationStick != '') {
bigStick = ''
}
yspHtml += `
<div id="${comment.uid}" data-time="${comment.active_time}" class="dance-people data${peopleId}" style="top: ${comment.top}; left: ${comment.left};">
<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}">
<div class="stick stick-swing ${bigStick} ${comment.ying_guang}"></div>
<div class="people-name ">${comment.name}</div>
<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 ${decorationWing}">&nbsp;</div>
</div>
</div>`
});//如果是舰长需要加上stick-swing-big-tow
});//如果是舰长需要加上stick-swing-big-tow充值用户加上stick-christmas同时去掉stick-swing-big-tow
//增加圣诞帽子在people-img那层增加people-hat。
//翅膀在people-wing 增加people-block
$('.dance-floor').prepend(yspHtml);
moveEv(uid);
// 随机舞
@ -183,7 +218,7 @@ function dancerRandom(){
$(function(){
dancerRandom();
// 自动切歌
changeMusic();
//changeMusic();
var audio=document.getElementById('music');
if(audio){
audio.loop = false;

View File

@ -6,6 +6,81 @@ let musicUrl = 'https://bili.scdxtc.cn'
// 自动删除不说话用户
let autoDel = false
// 是否开始虚拟人物
let virtualPeople = true
// 虚拟人物数量
let virtualNum = 50
// 虚拟人物名字列表
let virtualList = ['一只小绵飏','未来狗头耀武扬威什么','大牛逼玩意','长呆毛的呆猫','区实验川大聪明',
'卡拉提斯','洛天依ぅ','时光向晚','宵行Lis','给个香香的三连',
'不能翻身的咸鱼鹅','gxuangg','海绵eat宝宝','滚动的天空-轩','天知道我取了什么名字',
'秋去春来流水落花','溪溪子和酱酱子','秦昭烈帝曹操','樱子君','兜兜里有糖的洛洛',
'女王说部落都是废物','张卡2511小号','花大屎','小德佬冲鸭','l仙儿',
'钻石五的维克多','推进式地狱双头龙','骧华阳','暗月丶无心','织子双立人',
'下木先生','Naakoo','粉红色的小铲铲','drair1','为什么会变成大冬',
'红林叶影','整肠生南国','叶老狗-','瓜皮小博','一个过路的好人',
'不会玩的泰菲','三剑客2020','Kola呀考拉','住在张总的酒窝里','哆_哆啦A梦',
'一只小菜包呐','夫人老婆','爱霏妹的老邢','耄耋just','This-is-斯巴达'
]
let virtualWordList = ['哈哈哈', '我又来了!', '大爷闪亮登场', '真会玩 哈哈']
// 礼物所需电池
let giftObj = {
// '小心心': 99,
'粉丝团灯牌': 1,
'牛哇牛哇': 1,
'白银宝盒': 10,
'紫金宝盒': 100,
'金币':10,
'泡泡糖':10,
'打榜':10,
'疯狂应援':10,
'战车出击':100,
'冰阔落':100,
'粉玫瑰':100,
'聚光灯':100,
'战鼓声声':100,
'狂欢派对':100,
'超级战舰':100,
'D言D语': 330,
'星愿水晶球': 1000,
'为你加冕': 4500,
'探索者启航': 23330,
'小花花': 1,
'这个好诶': 10,
'盛典门票': 20,
'庆典礼花': 880,
'告白花束': 220,
'疯狂心动': 520,
'守护之翼': 2000,
'次元之城': 12450,
'i了i了': 1,
'打call': 5,
'情书': 52,
'干杯': 66,
'B坷垃': 99,
'撒花': 660,
'节奏风暴': 1000,
'心动卡': 1,
'泡泡机': 50,
'爱之魔力': 280,
'摩天轮': 1000,
'转运锦鲤': 6660,
'领航者飞船': 12450,
'友谊的小船': 52,
'冲浪': 1000,
'奈斯': 20,
'变身话筒': 20,
'喵娘': 52
}
// 用户消费电池 姓名: 电池量
let userCell = {}
// 多少秒不说话删除
let speakExpireTime = 10*60
// 歌曲列表
@ -152,8 +227,9 @@ function delExpireDiv() {
}
let timestamp = parseInt(new Date().getTime()/1000)
let delTime = timestamp - speakExpireTime
let delList = $(".dance-people").filter(function() {
return $(this).attr("data-time") < timestamp - speakExpireTime;
return $(this).attr("data-time") < delTime
})
// console.log(delList.length, speakExpireTime+'秒未说话人数')
delList.remove();
@ -177,8 +253,14 @@ function receiveMessage(event)
// 高能榜top3
let highList = dataList.high
// console.log(adminList, '舰长列表')
// console.log(highList, '高能榜列表')
// 送礼物列表
let giftList = dataList.gift
// console.log(giftList, '获取的礼物列表')
if (giftList.length > 0) {
updateUserCell(giftList)
console.log(userCell, '用户电池记录')
}
if (data.length <= 0) {
return false
@ -233,10 +315,35 @@ function receiveMessage(event)
leader.text = dm.text
leader.event = eventName ? eventName : leaderEvent
}
let decoration = []
let userCellNum = userCell[dm.uname]
userCell['流域_墨绿绿'] = 99999
userCell['yin5th'] = 15
// userCell['未来狗头耀武扬威什么'] = 1
if (userCellNum != undefined) {
// 1个电池送圣诞帽
if (userCellNum >= 1) {
decoration.push('people-hat')
}
// 10个电池送圣诞树光棒子
if (userCellNum >= 10) {
decoration.push('stick-christmas')
}
// 99个电池送大翅膀一对
if (userCellNum >= 99) {
decoration.push('people-block')
}
console.log('付费用户['+dm.uname+']说:'+dm.text, '付费用户发言记录')
}
// 新用户
if(dm.is_new==1){
// if(dm.uname!=leader.uname){//如果弹幕的人的名字不等于领舞者的名字,就创建一个人物
peopleObj(dm.uname,dm.uid,dm.text,dm.event,dm.active_time,dm.is_admin);
peopleObj(dm.uname,dm.uid,dm.text,dm.event,dm.active_time,dm.is_admin, decoration);
// }
} else {
// 老用户
@ -248,7 +355,26 @@ function receiveMessage(event)
// 舰长添加大宝剑
$(`#${dm.uid} .stick`).addClass("stick-swing-big-tow");
}
setTimeout(()=>{//关闭当前说话
if (decoration.length > 0) {
// 添加帽子
if (decoration.indexOf('people-hat') != -1) {
$(`#${dm.uid} .people-img`).removeClass("people-hat").addClass('people-hat');
}
// 添加棒子
if (decoration.indexOf('stick-christmas') != -1) {
$(`#${dm.uid} .stick`).removeClass("stick-christmas").removeClass('stick-swing-big-tow').addClass('stick-christmas');
}
// 添加翅膀
if (decoration.indexOf('people-block') != -1) {
$(`#${dm.uid} .people-wing`).removeClass("people-block").addClass('people-block');
}
}
setTimeout(()=>{
//关闭当前说话
$(`#${dm.uid} .speak`).addClass("dn");
},3000)
// 舞者喊舞---动作舞
@ -369,7 +495,49 @@ function receiveMessage(event)
// -------------------- 每条弹幕处理 end -----------------------
}
music();
// 创建随机人物
function createVirtual() {
for (let i = 0; i < virtualNum; i++) {
let eventName = eventTextList[Math.floor(Math.random()*(eventTextList.length-1))]
let word = virtualWordList[Math.floor(Math.random()*(virtualWordList.length-1))]
if (virtualList[i] != undefined) {
peopleObj(virtualList[i], 'virtual'+i, word, getEvent(eventName), 0, 0);
} else {
peopleObj('我是卧底95'+i, 'virtual'+i, word, getEvent(eventName), 1638930062, 0);
}
}
}
function updateUserCell(list) {
$.each(list, function (index, item) {
let cell = 0
// console.log(item.uname + ' -- '+item.gift+ ' num:'+item.num, '礼物信息')
// console.log(giftObj, '礼物对象')
let giftCellNum = giftObj[item.gift]
// console.log(giftCellNum)
if (giftCellNum != undefined) {
cell = giftCellNum * item.num
}
// console.log(item.uname + ' -- '+item.gift+ ' num:'+item.num + ' cell='+cell, '礼物信息')
if (cell > 0) {
if (userCell[item.uname] == undefined) {
userCell[item.uname] = cell
} else {
userCell[item.uname] = userCell[item.uname] + cell
}
}
})
}
// music();
// 清理缓存
sessionStorage.clear()
$(function(){
// 创建虚拟人物
if (virtualPeople) {
createVirtual()
}
})
window.addEventListener("message", receiveMessage, false);