three实现在线glb三维模型压缩器代码

代码语言:html

所属分类:三维

代码描述:three实现在线glb三维模型压缩器代码,可将大型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>Three.js GLB 模型在线压缩工具</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: #f0f2f5;
            color: #333;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .container {
            background: #fff;
            padding: 30px 40px;
            border-radius: 12px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
            width: 90%;
            max-width: 500px;
            text-align: center;
        }
        h1 {
            margin-top: 0;
            color: #1a1a1a;
            font-weight: 600;
        }
        p {
            color: #666;
            margin-bottom: 25px;
        }
        .control-group {
            margin-bottom: 20px;
        }
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
        }
        input[type="file"] {
            display: none;
        }
        .file-label {
            display: inline-block;
            padding: 12px 20px;
            background-color: #007bff;
            color: white;
            border-radius: 6px;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        .file-label:hover {
            background-color: #0056b3;
        }
        #file-name {
            margin-top: 10px;
            font-style: italic;
            color: #555;
            min-height: 20px;
        }
        input[type="range"] {
            width: 100%;
            cursor: pointer;
        }
        #compression-va.........完整代码请登录后点击上方下载按钮下载查看

网友评论0