three实现三维有声动画片代码
代码语言:html
所属分类:其他
代码由deepseek-v4.1 ai生成,可能有错误,仅供参考:点击查看提示词
代码描述:三维有声动画片制作
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>机器人种花 · 三维有声短片</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #06090f; }
body {
font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
-webkit-tap-highlight-color: transparent;
}
#scene { display: block; width: 100%; height: 100%; }
/* ---------- 字幕条 ---------- */
#subtitle {
position: fixed;
left: 50%;
bottom: 6.5%;
transform: translate(-50%, 12px);
max-width: min(90vw, 900px);
padding: 14px 32px;
background: rgba(8, 14, 26, 0.66);
border: 1px solid rgba(140, 200, 255, 0.22);
border-radius: 14px;
color: #ffffff;
font-size: clamp(16px, 2.3vw, 25px);
line-height: 1.5;
letter-spacing: 2px;
text-align: center;
text-shadow:
0 0 6px rgba(0, 0, 0, 0.95),
0 2px 3px rgba(0, 0, 0, 0.9),
0 0 20px rgba(120, 200, 255, 0.45);
opacity: 0;
transition: opacity 0.32s ease, transform 0.32s ease;
pointer-events: none;
z-index: 6;
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
}
#subtitle.show { opacity: 1; transform: translate(-50%, 0); }
/* ---------- 启动遮罩 ---------- */
#overlay {
position: fixed;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
padding: 24px;
text-align: center;
background: radial-gradient(circle at 50% 38%, rgba(34, 60, 108, 0.78), rgba(4, 7, 14, 0.96));
color: #e8f3ff;
z-index: 10;
transition: opacity 0.65s ease, visibility 0.65s;
}
#overlay.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#overlay h1 {
font-size: clamp(26px, 5vw, 54px);
letter-spacing: 10px;
font-weight: 800;
background: linear-gradient(180deg, #ffffff 20%, #7fd0ff 100%);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
text-shadow: 0 0 34px rgba(120, 190, 255, 0.4);
}
#overlay .sub {
font-size: clamp(12px, 1.6vw, 16px);
color: #9fc2e8;
letter-spacing: 4px;
}
#overlay .tip {
font-size: clamp(11px, 1.4vw, 14px);
color: #6f8db0;
letter-spacing: 2px;
margin-top: 4px;
}
#playBtn {
margin-top: 12px;
padding: 15px 48px;
font-size: clamp(17px, 2vw, 21px);
letter-spacing: 5px;
font-weight: 800;
font-family: inherit;
color: #06121f;
background: linear-gradient(180deg, #c4f0ff, #5fc6f5);
border: none;
border-radius: 999px;
cursor: pointer;
box-shadow: 0 0 28px rgba(110, 200, 255, 0.55), 0 8px 22px rgba(0, 0, 0, 0.45);
transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#playBtn:hover { transform: translateY(-2px) scale(1.035); box-shadow: 0 0 42px rgba(150, 225, 255, 0.85), 0 10px 26px rgba(0, 0, 0, 0.5); }
#playBtn:active { transform: translateY(1px) scale(0.99); }
#playBtn:disabled { opacity: 0.55; cursor: default; transform: none; }
/* ---------- 降级提示 ---------- */
#ttsWarn {
position: fixed;
top: 16px;
left: 50%;
transform: translateX(-50%);
max-width: 90vw;
padding: 10px 22px;
border-radius: 10px;
background: rgba(122, 32, 32, 0.9);
color: #ffe9e9;
font-size: 13px;
letter-spacing: 1px;
z-index: 20;
display: none;
}
#ttsWarn.show { display: block; }
/* ---------- 左上角 HUD ---------- */
#hud {
position: fixed;
top: 14px;
left: 18px;
color: rgba(170, 208, 255, 0.5);
font-size: 12px;
letter-spacing: 2px;
pointer-events: none;
z-index: 5;
}
</style>
</head>
<body>
<canvas id="scene"></canvas>
<div id="hud">机器人种花 · A Robot's Flower</div>
<div id=&qu.........完整代码请登录后点击上方下载按钮下载查看















网友评论0