three实现三维空间自定义多米洛骨牌演示动画效果代码
代码语言:html
所属分类:三维
代码描述:three实现三维空间自定义多米洛骨牌演示动画效果代码
代码标签: three 三维 空间 自定义 多米洛 骨牌 演示 动画
下面为部分代码预览,完整代码请点击下载或在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>3D多米诺骨牌游戏</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', Arial, sans-serif;
overflow: hidden;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
#container {
width: 100vw;
height: 100vh;
position: relative;
}
#canvas {
display: block;
width: 100%;
height: 100%;
}
.control-panel {
position: absolute;
top: 20px;
left: 20px;
background: rgba(0, 0, 0, 0.85);
padding: 25px;
border-radius: 15px;
color: white;
min-width: 320px;
max-height: 90vh;
overflow-y: auto;
backdrop-filter: blur(10px);
border: 2px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.control-panel::-webkit-scrollbar {
width: 8px;
}
.control-panel::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
}
.control-panel::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
.panel-header {
text-align: center;
margin-bottom: 20px;
padding-bottom: 15px;
border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}
.panel-header h1 {
font-size: 24px;
margin-bottom: 5px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.panel-header p {
font-size: 12px;
color: #aaa;
}
.control-group {
margin-bottom: 20px;
}
.control-group label {
display: block;
margin-bottom: 10px;
font-size: 14px;
color: #ccc;
font-weight: bold;
}
.pattern-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
margin-bottom: 10px;
}
.pattern-btn {
padding: 12px;
border: 2px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.1);
color: white;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s;
font-size: 13px;
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
}
.pattern-btn:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}
.pattern-btn.active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-color: #667eea;
box-shadow: 0 0 20px rgba(102, 126, 23.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0