three实现三维圣诞节圣诞树下雪动画场景效果代码
代码语言:html
所属分类:三维
代码描述:three实现三维圣诞节圣诞树下雪动画场景效果代码,可选择音乐渲染氛围。
代码标签: three 三维 圣诞节 圣诞树 下雪 动画 场景
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🎄 圣诞节音乐可视化 - 3D雪夜场景</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
overflow: hidden;
background: #0a0a1a;
font-family: 'Arial', sans-serif;
}
canvas { display: block; }
#overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, rgba(10,20,40,0.95), rgba(30,10,30,0.95));
z-index: 100;
gap: 30px;
}
#overlay h1 {
color: #fff;
font-size: 42px;
text-shadow: 0 0 20px #ff6b6b, 0 0 40px #4ecdc4;
animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
from { text-shadow: 0 0 20px #ff6b6b, 0 0 40px #4ecdc4; }
to { text-shadow: 0 0 30px #4ecdc4, 0 0 60px #ff6b6b; }
}
#startBtn {
padding: 25px 60px;
font-size: 28px;
background: linear-gradient(45deg, #c41e3a, #228b22, #c41e3a);
background-size: 200% 200%;
animation: gradientMove 3s ease infinite;
color: white;
border: 3px solid rgba(255,255,255,0.3);
border-radius: 50px;
cursor: pointer;
box-shadow: 0 0 40px rgba(196,30,58,0.5), 0 0 80px rgba(34,139,34,0.3);
transition: all 0.3s;
}
@keyframes gradientMove {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
#startBtn:hover {
transform: scale(1.1);
box-shadow: 0 0 60px rgba(196,30,58,0.8), 0 0 120px rgba(34,139,34,0.5);
}
.upload-area {
display: flex;
flex-direction: column;
align-items: center;
gap: 15px;
}
#musicInput { display: none; }
#uploadLabel {
padding: 15px 40px;
background: rgba(255,255,255,0.1);
color: #fff;
border: 2px dashed rgba(255,255,255,0.5);
border-radius: 15px;
cursor: pointer;
transition: all 0.3s;
font-size: 18px;
}
#uploadLabel:hover {
background: rgba(255,255,255,0.2);
border-color: #4ecdc4;
}
#fileName {
color: #4ecdc4;
font-size: 14px;
}
#controls {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 15px;
z-index: 10;
}
.control-btn {
padding: 12px 25px;
background: rgba(255,255,255,0.15);
color: white;
border: 1px solid rgba(255,255,255,0.3);
border-radius: 25px;
cursor: pointer;
backdrop-filter: blur(10px);
transition: all 0.3s;
font-size: 14px;
}
.control-btn:hover {
background: rgba(255,255,255,0.3);
transform: translateY(-2px);
}
#info {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
color: rgba(255,255,255,0.8);
text-align: center;
font-size: 14px;
text-shadow: 0 0 10px rgba(0,0,0,0.8);
background: rgba(0,0,0,0.3);
padding: 10px 25px;
border-radius: 20px;
backdrop-filter: blur(5px);
}
#visualizerInfo {
position: absolute;
top: 80px;
left: 20px;
color: white;
font-size: 12px;
background: rgba(0,0,0,0.5);
padding: 15px;
border-radius: 10px;
display: none;
}
</style>
</head>
<body>
<div id="overlay">
<h1>🎄 Merry Christmas 🎅</h1>
<div class="upload-area">
<label id="up.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0