点击屏幕开启麦克风权限

Happy Birthday

毕延文 · 5月14日

对着手机吹气,或在蛋糕上快速挥动手指/鼠标
使劲吹 → 火焰飘动 → 蜡烛熄灭

生日快乐 🎂

毕延文 · 愿新的一岁,所愿皆所得

🎁
事事顺心
好运连连
🎁
钱包鼓鼓
烦恼全无
🎁
身体健康
吃嘛嘛香
🎁
友谊长存
快乐加倍
✨ 请先刮开封存 ✨祝你好运
🖋️ 用手指或鼠标在上面涂抹
mentById('scratchAgain').classList.remove('show'); // 随机奖项 const p=prizes[Math.floor(Math.random()*prizes.length)]; document.getElementById('prizeText').innerHTML=`${p.t}${p.s}`; } function resetScratch(){initScratch();} // 刮开交互 (function(){ const cvs=document.getElementById('scratchCanvas'); if(!cvs)return; const ctx=cvs.getContext('2d'); let drawing=false; function scratch(x,y){ if(scratchRevealed)return; ctx.globalCompositeOperation='destination-out'; ctx.beginPath(); ctx.arc(x,y,18,0,Math.PI*2); ctx.fill(); // 检测比例 if(Math.random()<.05){ const d=ctx.getImageData(0,0,cvs.width,cvs.height).data; let t=0; for(let i=3;i128)t++; if(t/(cvs.width*cvs.height)>.35){ ctx.clearRect(0,0,cvs.width,cvs.height); scratchRevealed=true; document.getElementById('scratchAgain').classList.add('show'); } } } cvs.addEventListener('mousedown',e=>{drawing=true;scratch(e.offsetX,e.offsetY);}); cvs.addEventListener('mousemove',e=>{if(drawing)scratch(e.offsetX,e.offsetY);}); cvs.addEventListener('mouseup',()=>drawing=false); cvs.addEventListener('mouseleave',()=>drawing=false); cvs.addEventListener('touchstart',e=>{e.preventDefault();const t=e.touches[0],r=cvs.getBoundingClientRect();drawing=true;scratch(t.clientX-r.left,t.clientY-r.top);},{passive:false}); cvs.addEventListener('touchmove',e=>{e.preventDefault();if(!drawing)return;const t=e.touches[0],r=cvs.getBoundingClientRect();scratch(t.clientX-r.left,t.clientY-r.top);},{passive:false}); cvs.addEventListener('touchend',()=>drawing=false); })(); initScratch(); // 庆祝阶段启动弹幕 const _origStart=startCelebrate; startCelebrate=function(){ _origStart(); startDanmu(); }; const _origReset=resetAll; resetAll=function(){ stopDanmu(); _origReset(); initScratch(); };