赶走病羊羊 迎接新的一年
<style>
#papa { margin: 120px 0 0 calc(50% - 621px); width: 1080px; height: 1080px; background: lightblue url('https://pic.imgdb.cn/item/63b026992bbf0e7994d257a3.jpg'); box-shadow: 3px 3px 20px #000; position: relative; display: grid; place-items: center; z-index: 1; }
</style>
<div id="papa"></div>
<audio id="aud" src="https://music.163.com/song/media/outer/url?id=864255631.mp3" loop autoplay></audio>
<script>
(function() {
(function(mkPlayer) {let defaults = {lrcAr: [],ypData: new Array(500).fill(0).map((v, k) => Math.floor(Math.random() * 200) + 10),pinpu: {size: 2.5, gap: 1,},player_css: 'left: 50%; transform: translateX(-50%); /*--color1: olive; --color2: silver*/',lrc_css:'',playerCode: `<style>#mplayer {--color1: green; --color2: lightgreen;position: absolute;bottom: 60px; left: calc(50% - 60px);width: 120px; height: 120px;border-radius: 50%;border: 6px solid var(--color1);display: grid; place-items: center center;user-select: none; cursor: pointer;}#tmsg { font: normal 14px sans-serif; color: var(--color1); text-shadow: 1px 1px 1px #000; z-index: 650; }#lrc {--motion: cover2;--tt: 2s;--state: paused;--bg: linear-gradient(180deg, hsla(120, 50%, 50%, .45), hsla(120, 100%, 50%, .75));position: absolute; top: 20px;font:bold 2.4em sans-serif;color: hsl(0, 10%, 90%);white-space: pre;-webkit-background-clip: text;filter: drop-shadow(1px 1px 2px hsla(0, 0%, 0%, .95));} #lrc::before {position: absolute;content: attr(data-lrc);width: 20%;height: 100%;color: transparent;overflow: hidden;white-space: pre;background: var(--bg);filter: inherit;-webkit-background-clip: text;animation: var(--motion) var(--tt) linear forwards;animation-play-state: var(--state);}.mLine { --hh: 0px; position: absolute; width: 2px; height: 6px; background: var(--color1); }.mLine::before, .mLine::after {position: absolute;content: '';width: 100%;height: var(--hh); }.mLine::before { bottom: 0;left: 0;background: linear-gradient(to top, var(--color1), var(--color2)); }.mLine::after { top: 0;left: 0;background: linear-gradient(to bottom, var(--color1), var(--color2)); }@keyframes cover1 {from {width: 0;} to {width: 100%;}}@keyframes cover2 {from {width: 0;} to {width: 100%;}}</style><div id="mplayer"><span id="tmsg">play</span></div><div id="lrc" data-lrc="HCPlayer">HCPlayer--</div>`,};let playCode = (user_config) => {let data = Object.assign({}, defaults, user_config);papa.innerHTML += data.playerCode;mplayer.style.cssText += data.player_css;aud.loop = false;let ppsize = data.pinpu.size, gap = data.pinpu.gap;let mKey = 0, mFlag = true, ppnum = 0;let total = Math.floor(mplayer.clientWidth * Math.PI / (ppsize + gap));for(j=0; j< total; j++) {let ele = document.createElement('span');ele.className = 'mLine';ele.style.width = ppsize + 'px';ele.style.transform = `rotate(${j*360/total}deg) translateY(63px)`; mplayer.appendChild(ele);}let lines = document.querySelectorAll('.mLine');let max = Math.max.apply(null, data.ypData);let divide = max / mplayer.offsetHeight, coe = 10 / total / 2, plus;let update = () => {lines.forEach((item,key) => {plus = (key < total / 2 ? key : total - key) * coe * 5;item.style.setProperty('--hh',(Math.random() * ypData - 2) / 5 + plus + 'px');});if(!aud.paused) window.requestAnimationFrame(update);};mplayer.onclick = () => aud.paused ? aud.play() : aud.pause();aud.addEventListener('pause', () => mState());aud.addEventListener('playing', () => { mState(); update(); });aud.addEventListener('ended', () => { mKey = 0; ppnum = 0; aud.play(); });aud.addEventListener('timeupdate', () => {ppnum++;if (ppnum >= data.ypData.length) ppnum = 0;tmsg.innerText = '-' + toMin(aud.duration - aud.currentTime);for (j = 0; j < data.lrcAr.length; j++) {if (aud.currentTime >= data.lrcAr) {cKey = j;if (mKey === j) showLrc(data.lrcAr);else continue;}}});let mState = () => aud.paused ? lrc.style.setProperty('--state', 'paused') : lrc.style.setProperty('--state', 'running');let showLrc = (time) => {let name = mFlag ? 'cover1' : 'cover2';lrc.innerHTML = data.lrcAr;lrc.dataset.lrc = data.lrcAr.replace(/<br>/, '\n');lrc.style.setProperty('--motion', name);lrc.style.setProperty('--tt', time + 's');lrc.style.setProperty('--state', 'running');mKey += 1;mFlag = !mFlag;};let toMin = (val) => {if (!val) return '00:00';val = Math.floor(val);let min = parseInt(val / 60),sec = parseFloat(val % 60);if (min < 10) min = '0' + min;if (sec < 10) sec = '0' + sec;return min + ':' + sec;};};mkPlayer.HCPlayer = playCode;})(this);
let lrcAr = [
,
,
,
,
];
let ypData = ;
HCPlayer({
lrcAr: lrcAr,
ypData: ypData,
lrc_css: '',
player_css: '--color1: Lime; --color2: #00a85f; left: 320px;',
pinpu: {size: 1, gap: 0,},
});
})();
</script>
<br><br><br><br><br> 阳过了,阳过了,赶走病羊羊,迎接2023新的一年 去年最高摇一摇89,看看今年的手气 新的一年开个新帖 看看新的一年运气好不好 其实这个摇一摇也是一种刺激,那多少真无所谓 第一个就没有碰到运气 小贴子做的蛮好的,新年快乐哈{:10_402:} 一起赶走阳 希望大家都不会再阳了