three实现三维模型glb gltf文件压缩瘦身代码
代码语言:html
所属分类:三维
代码描述:three实现三维模型glb gltf文件压缩瘦身代码
代码标签: three 三维 模型 glb gltf 文件 压缩 瘦身 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Model Compressor & Viewer</title>
<style>
:root {
--primary: #10b981;
--primary-dark: #059669;
--surface-ground: #0a0a0a;
--surface-card: #171717;
--surface-border: #262626;
--text-color: #fafafa;
--text-muted: #a3a3a3;
}
* {
box-sizing: border-box;
}
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: var(--surface-ground);
color: var(--text-color);
}
#app {
height: 100%;
display: flex;
flex-direction: row;
}
.canvas-container {
position: relative;
flex: 1;
background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
overflow: hidden;
}
.sidebar {
width: 380px;
background: var(--surface-card);
border-left: 1px solid var(--surface-border);
display: flex;
flex-direction: column;
overflow-y: auto;
z-index: 10;
box-shadow: -2px 0 10px rgba(0,0,0,0.2);
}
.sidebar::-webkit-scrollbar {
width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
background-color: #404040;
border-radius: 3px;
}
/* Drop Overlay */
.drop-overlay {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.9);
backdrop-filter: blur(8px);
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
}
.drop-card {
background: var(--surface-card);
border: 1px solid var(--surface-border);
border-radius: 16px;
padding: 3rem;
text-align: center;
max-width: 500px;
width: 90%;
box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.drop-zone {
border: 2px dashed var(--surface-border);
border-radius: 12px;
padding: 2.5rem;
margin: 1.5rem 0;
background: var(--surface-ground);
transition: all 0.2s;
cursor: pointer;
}
.drop-zone:hover, .drop-zone.dragging {
border-color: var(--primary);
background: rgba(16, 185, 129, 0.05);
}
/* Loading Overlay */
.loading-overlay {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.7);
backdrop-filter: blur(4px);
z-index: 50;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
}
.spinner {
width: 48px;
height: 48px;
border: 3px solid var(--surface-border);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Stats Chips */
.stats-bar {
position: absolute;
top: 1rem;
left: 1rem;
display: flex;
gap: 0.5rem;
z-index: 10;
}
.stat-chip {
background: rgba(0,0,0,0.7);
backdrop-filter: blur(8px);
border: 1px solid var(--surface-border);
border-radius: 20px;
padding: 0.4rem 0.8rem;
font-size: 0.75rem;
display: flex;
align-items: center;
gap: 0.4rem;
}
/* Sidebar Components */
.sidebar-header {
padding: 1.25rem;
border-bottom: 1px solid var(--surface-border);
background: rgba(0,0,0,0.3);
}
.sidebar-content {
flex: 1;
overflow-y: auto;
padding: 1rem;
}
.sidebar-footer {
padding: 1rem;
border-top: 1px solid var(--surface-border);
background: var(--surface-card);
}
/* Cards */
.card {
background: var(--sur.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0