three三维操控挖掘机代码

代码语言:html

所属分类:三维

代码描述:three三维操控挖掘机代码,可以控制挖掘机行驶,转弯,控制大臂小臂与铲斗。

代码标签: three 三维 操控 挖掘机 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh">
<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 {
            overflow: hidden;
            font-family: 'Segoe UI', Arial, sans-serif;
        }
        
        #gameCanvas {
            display: block;
        }
        
        #ui {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }
        
        #controls {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(0, 0, 0, 0.8);
            color: #fff;
            padding: 20px;
            border-radius: 15px;
            font-size: 13px;
            line-height: 1.8;
            border: 2px solid #f59e0b;
            max-width: 280px;
        }
        
        #controls h3 {
            color: #f59e0b;
            margin-bottom: 15px;
            font-size: 18px;
            text-align: center;
            border-bottom: 1px solid #f59e0b;
            padding-bottom: 10px;
        }
        
        .control-group {
            margin-bottom: 12px;
        }
        
        .control-group h4 {
            color: #fbbf24;
            font-size: 14px;
            margin-bottom: 5px;
        }
        
        kbd {
            background: #374151;
            padding: 3px 8px;
            border-radius: 4px;
            border: 1px solid #6b7280;
            font-family: monospace;
            font-size: 12px;
        }
        
        #stats {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(0, 0, 0, 0.8);
            color: #fff;
            padding: 20px;
            border-radius: 15px;
            min-width: 200px;
            border: 2px solid #10b981;
        }
        
        #stats h3 {
            color: #10b981;
            margin-bottom: 15px;
            text-align: center;
            border-bottom: 1px solid #10b981;
            padding-bottom: 10px;
        }
        
        .stat-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        
        .stat-label {
            color: #9ca3af;
        }
        
        .stat-value {
            color: #fbbf24;
            font-weight: bold;
        }
        
        #armStatus {
            position: absolute;
            bottom: 20px;
            left: 20px;
            background: rgba(0, 0, 0, 0.8);
            color: #fff;
            padding: 20px;
            border-radius: 15px;
            border: 2px solid #3b82f6;
        }
        
        #armStatus h3 {
            color: #3b82f6;
            margin-bottom: 15px;
            text-align: center;
        }
        
        .arm-indicator {
            margin-bottom: 8px;
        }
        
        .arm-indicator label {
            display: inline-block;
            width: 80px;
            color: #9ca3af;
        }
        
        .progress-bar {
            display: inline-block;
            width: 120px;
            height: 12px;
            background: #374151;
            border-radius: 6px;
            overflow: hidden;
            vertical-align: middle;
        }
        
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #60a5fa);
            transition: width 0.1s;
        }
        
        #minimap {
            position: absolute;
            bottom: 20px;
            right: 20px;
            width: 180px;
            height: 180px;
            background: rgba(0, 0, 0, 0.8);
            border-radius: 15px;
            border: 2px solid #8b5cf6;
            overflow: hidden;
        }
        
        #minimapCanvas {
            width: 100%;
            height: 100%;
        }
        
        #message {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.9);
            color: #fff;
            padding: 30px 50px;
            border-radius: 20px;
            font-size: 24px;
            text-align: center;
            display: none;
            border: 3px solid #f59e0b;
        }
        
        #compass {
            position: absolute;
            top: 100px;
            right: 30px;
            width: 80px;
            height: 80px;
        }
        
        .camera-btn {
            position: absolute;
            bottom: 220px;
            right: 30px;
            background: rgba(0, 0, 0, 0.8);
            color: #fff;
            border: 2px solid #8b5cf6;
            padding: 12px 20px;
            border-radius: 10px;
            cur.........完整代码请登录后点击上方下载按钮下载查看

网友评论0