Three+ MediaPipe摄像头手势识别倒计时烟花祝福粒子动画效果代码
代码语言:html
所属分类:粒子
代码描述: Three+ MediaPipe摄像头手势识别倒计时烟花祝福粒子动画效果代码,手势识别321倒计时,然后夜空下雪+烟花绽放+祝福文字。
代码标签: Three MediaPipe 摄像头 手势 识别 倒计时 烟花 祝福 粒子 动画 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>手势倒计时烟花祝福</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', sans-serif;
background: #000;
overflow: hidden;
color: white;
}
#threeCanvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
/* 倒计时界面 */
.countdown-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 100%);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 100;
transition: opacity 1s, visibility 1s;
}
.countdown-screen.hidden {
opacity: 0;
visibility: hidden;
}
.countdown-title {
font-size: 2rem;
margin-bottom: 30px;
background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcb77);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0%, 100% { filter: brightness(1); }
50% { filter: brightness(1.3); }
}
.countdown-number {
font-size: 15rem;
font-weight: bold;
text-shadow: 0 0 50px rgba(255, 107, 107, 0.8),
0 0 100px rgba(255, 107, 107, 0.5);
animation: pulse 0.5s ease-in-out;
min-height: 250px;
display: flex;
align-items: center;
justify-content: center;
}
@keyframes pulse {
0% { transform: scale(1.5); opacity: 0; }
50% { transform: scale(1.1); }
100% { transform: scale(1); opacity: 1; }
}
.countdown-hint {
margin-top: 40px;
font-size: 1.2rem;
color: #888;
}
.gesture-hint {
display: flex;
gap: 30px;
margin-top: 30px;
}
.gesture-step {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
background: rgba(255,255,255,0.05);
border-radius: 15px;
transition: all 0.3s;
opacity: 0.5;
}
.gesture-step.active {
opacity: 1;
background: rgba(255, 107, 107, 0.2);
transform: scale(1.1);
box-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}
.gesture-step.done {
opacity: 0.3;
}
.gesture-icon {
font-size: 3rem;
margin-bottom: 10px;
}
/* 摄像头面板 */
.camera-panel {
position: fixed;
bottom: 20px;
right: 20px;
width: 280px;
background: rgba(0, 0, 0, 0.8);
border-radius: 15px;
overflow: hidden;
z-index: 200;
border: 2px solid rgba(255, 107, 107, 0.3);
}
.camera-header {
padding: 10px 15px;
background: linear-gradient(90deg, #f.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0