three实现三维材质可视化选择调整代码
代码语言:html
所属分类:三维
代码描述:three实现三维材质可视化选择调整代码
代码标签: three 三维 材质 可视化 选择 调整 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
overflow: hidden;
background: #0a0a0a;
cursor: move;
font-family: 'Monaco', monospace;
user-select: none;
}
#canvas {
display: block;
}
.controls {
position: absolute;
top: 20px;
right: 20px;
background: rgba(0, 0, 0, 0.85);
padding: 15px;
border-radius: 4px;
color: #aaa;
font-size: 10px;
width: 240px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
cursor: default;
}
.control-group {
margin-bottom: 12px;
}
.control-group label {
display: block;
margin-bottom: 4px;
color: #888;
font-size: 9px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.control-group input[type="range"] {
width: 100%;
height: 2px;
background: #333;
outline: none;
-webkit-appearance: none;
cursor: pointer;
}
.control-group input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 10px;
height: 10px;
background: #fff;
cursor: pointer;
border-radius: 50%;
}
.value {
float: right;
color: #fff;
}
.info {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
color: #666;
font-size: 11px;
text-align: center;
pointer-events: none;
}
h3 {
color: #fff;
font-size: 11px;
margin-bottom: 12px;
font-weight: normal;
border-bottom: 1px solid #333;
padding-bottom: 8px;
}
.presets {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
margin-bottom: 15px;
}
.preset-btn {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #aaa;
padding: 6px 4px;
border-radius: 3px;
cursor: pointer;
font-size: 9px;
transition: all 0.2s;
text-align: center;
}
.preset-btn:hover {
background: rgba(255, 255, 255, 0.1);
color: #fff;
border-color: rgba(255, 255, 255, 0.3);
}
.preset-btn.active {
background: rgba(255, 255, 255, 0.15);
color: #fff;
border-color: rgba(255, 255, 255, 0.5);
}
.export-btn {
width: 100%;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #fff;
padding: 8px;
border-radius: 3px;
cursor: pointer;
font-size: 10px;
margin-top: 15px;
transition: all 0.2s;
}
.export-btn:hover {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.4);
}
.light-temp {
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid #333;
}
.copied {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 255, 0, 0.2);
color: #0f0;
padding: 20px 40px;
border-radius: 4px;
border: 1px solid #0f0;
pointer-events: none;
opacity: 0;
transition: opacity 0.3s;
}
.copied.show {
opacity: 1;
}
.attribution {
position: absolute;
bottom: 20px;
left: 20px;
font-size: 9px;
color: #444;
text-decoration: none;
transition: color 0.2s;
}
.attribution:hover {
color: #666;
}
</style>
</head>
<body translate="no">
<canvas id="canvas"></canvas>
<div class="controls">
<h3>MATERIAL PRESETS</h3>
<div class="presets">
<button class="preset-btn" data-preset="chrome">Chrome</button>
<b.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0