three实现对glb三维模型优化减少顶点数清空内部保留外壳减少大小代码
代码语言:html
所属分类:三维
代码描述:three实现对glb三维模型优化减少顶点数清空内部保留外壳减少大小代码
代码标签: three glb 三维 模型 优化 减少 顶点数 清空 内部 保留 外壳 减少 大小 代码
下面为部分代码预览,完整代码请点击下载或在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>GLB模型优化工具 (ES Module版)</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Segoe UI', Arial, sans-serif;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
min-height: 100vh; color: #fff; overflow: hidden;
}
.container { display: flex; height: 100vh; }
/* 左侧面板 */
.panel {
width: 360px; background: rgba(0,0,0,0.5); backdrop-filter: blur(10px);
padding: 20px; overflow-y: auto; border-right: 1px solid rgba(255,255,255,0.1);
display: flex; flex-direction: column; gap: 15px;
}
h1 { font-size: 18px; color: #4a9eff; margin-bottom: 10px; border-bottom: 2px solid #4a9eff; padding-bottom: 10px; }
.section { background: rgba(255,255,255,0.05); border-radius: 8px; padding: 12px; }
h3 { font-size: 14px; margin-bottom: 10px; color: #aaa; }
/* 上传区域 */
.upload-area {
border: 2px dashed #4a9eff; border-radius: 8px; padding: 20px;
text-align: center; cursor: pointer; transition: 0.3s;
}
.upload-area:hover { background: rgba(74, 158, 255, 0.1); }
input[type="file"] { display: none; }
/* 控件 */
.control-group { margin-bottom: 12px; }
label { display: flex; justify-content: space-between; font-size: 12px; color: #ccc; margin-bottom: 5px; }
input[type="range"] { width: 100%; cursor: pointer; }
.checkbox-group { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; margin-bottom: 8px;}
input[type="checkbox"] { cursor: pointer; }
/* 统计 */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; }
.stat-item { background: rgba(0,0,0,0.3); padding: 8px; border-radius: 4px; text-align: center; }
.stat-val { color: #4a9eff; font-weight: bold; font-size: 14px; }
/* 按钮 */
button {
width: 100%; padding: 10px; bor.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0