three实现三维3d打印机模拟打印代码

代码语言:html

所属分类:三维

代码描述:three实现三维3d打印机模拟打印代码

代码标签: three 三维 3d 打印机 模拟 打印 代码

下面为部分代码预览,完整代码请点击下载或在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: 'Segoe UI', Arial, sans-serif;
            background: #1a1a2e;
            color: #eee;
            overflow: hidden;
        }
        #canvas {
            display: block;
        }
        #controls {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(16, 16, 40, 0.9);
            border: 1px solid #333;
            border-radius: 12px;
            padding: 20px;
            width: 280px;
            backdrop-filter: blur(10px);
        }
        #controls h2 {
            text-align: center;
            margin-bottom: 15px;
            color: #00d4ff;
            font-size: 18px;
            border-bottom: 1px solid #333;
            padding-bottom: 10px;
        }
        .control-group {
            margin-bottom: 12px;
        }
        .control-group label {
            display: block;
            font-size: 13px;
            color: #aaa;
            margin-bottom: 4px;
        }
        .control-group select,
        .control-group input[type="range"] {
            width: 100%;
            padding: 6px;
            background: #2a2a4a;
            border: 1px solid #444;
            border-radius: 6px;
            color: #fff;
            font-size: 13px;
        }
        .control-group input[type="range"] {
            -webkit-appearance: none;
            height: 6px;
            padding: 0;
            cursor: pointer;
        }
        .control-group input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #00d4ff;
            cursor: pointer;
        }
        .range-value {
            text-align: right;
            font-size: 12px;
            color: #00d4ff;
        }
        .btn-row {
            display: flex;
            gap: 8px;
            margin-top: 15px;
        }
        .btn {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
        }
        .btn-start {
            background: linear-gradient(135deg, #00d4ff, #0090ff);
            color: #fff;
        }
        .btn-start:hover {
            background: linear-gradient(135deg, #00e4ff, #00a0ff);
            transform: scale(1.02);
        }
        .btn-pause {
            background: linear-gradient(135deg, #ff9800, #ff5722);
            color: #fff;
        }
        .btn-pause:hover {
            transform: scale(1.02);
        }
        .btn-reset {
            background: linear-gradient(135deg, #666, #444);
            color: #fff;
        }
        .btn-reset:hover {
            background: linear-gradient(135deg, #777, #555);
            transform: scale(1.02);
        }
        #status {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(16, 16, 40, 0.9);
            border: 1px solid #333;
            border-radius: 12px;
            padding: 20px;
            width: 240px;
            backdrop-filter: blur(10px);
        }
        #status h3 {
            color: #00d4ff;
            margin-bottom: 10px;
            font-size: 16px;
        }
        .status-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 13px;
        }
        .status-item span:first-child {
            color: #888;
        }
        .status-item span:last-child {
            color: #00d4ff;
            font-weight: bold;
        }
        .progress-bar {
            width: 100%;
            height: 8px;
            background: #2a2a4a;
            border-radius: 4px;
            margin-top: 10px;
            overflow: hidden;
        }
        .progress-fill {
            height: 100%;
            background: linear-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0