three实现三维暴雨中的机甲代码

代码语言:html

所属分类:三维

代码描述:three实现三维暴雨中的机甲代码

代码标签: three 三维 暴雨 机甲 代码

下面为部分代码预览,完整代码请点击下载或在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>JAEGER MK-III // 环太平洋重型机甲 3D 展示系统</title>
  <style>
    :root {
      --hud-bg: rgba(8, 14, 24, 0.72);
      --hud-border: rgba(56, 189, 248, 0.34);
      --cyan: #38bdf8;
      --orange: #ff6a2b;
      --amber: #fbbf24;
      --text: #e2e8f0;
      --dim: #7dd3fc;
    }

    * {
      box-sizing: border-box;
      user-select: none;
      -webkit-user-select: none;
    }

    html, body {
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #03060c;
      font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
      color: var(--text);
    }

    #canvas-wrap {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
    }

    /* 电影感扫描线与暗角 */
    .vignette {
      position: fixed;
      inset: 0;
      pointer-events: none;
      background: radial-gradient(circle at 50% 48%, transparent 52%, rgba(2, 5, 12, 0.78) 100%);
      z-index: 2;
    }

    /* 战术 HUD */
    .hud {
      position: fixed;
      inset: 0;
      pointer-events: none;
      padding: 18px 22px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      z-index: 10;
      transition: opacity 0.3s;
    }

    .hud.hidden {
      opacity: 0;
    }

    .hud-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
    }

    .panel {
      pointer-events: auto;
      background: var(--hud-bg);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--hud-border);
      box-shadow: 0 0 24px rgba(14, 165, 233, 0.12), inset 0 0 18px rgba(56, 189, 248, 0.05);
      border-radius: 10px;
      padding: 13px 16px;
      position: relative;
    }

    .panel::before {
      content: "";
      position: absolute;
      top: -1px;
      left: 14px;
      width: 44px;
      height: 2px;
      background: var(--cyan);
      box-shadow: 0 0 8px var(--cyan);
    }

    .title-block h1 {
      margin: 0;
      font-size: 18px;
      letter-spacing: 2px;
      font-weight: 800;
      color: #f8fafc;
      text-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
    }

    .title-sub {
      margin-top: 3px;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 11px;
      color: var(--cyan);
      letter-spacing: 1px;
    }

    .telemetry {
      margin-top: 10px;
      display: grid;
      grid-template-columns: repeat(2, auto);
      gap: 5px 18px;
      font-size: 11.5px;
      font-family: ui-monospace, monospace;
      color: #94a3b8;
    }

    .telemetry b {
      color: #f1f5f9;
    }

    .telemetry .hot {
      color: var(--orange);
      text-shadow: 0 0 8px rgba(255, 106, 43, 0.5);
    }

    /* 右上控制面板 */
    .right-panel {
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 268px;
    }

    .sec-label {
      font-size: 10.5px;
      font-family: ui-monospace, monospace;
      letter-spacing: 1.2px;
      color: var(--cyan);
      margin-bottom: 6px;
      text-transform: uppercase;
    }

    .btn-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
    }

    .btn {
      pointer-events: auto;
      border: 1px solid rgba(148, 163, 184, 0.25);
      background: rgba(15, 23, 42, 0.72);
      color: #e2e8f0;
      font-size: 12px;
      font-weight: 600;
      padding: 7px 10px;
      border-radius: 6px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.16s ease;
    }

    .btn:hover {
      border-color: var(--cyan);
      background: rgba(56, 189, 248, 0.16);
      color: #fff;
    }

    .btn.active {
      border-color: var(--orange);
      background: rgba(255, 106, 43, 0.22);
      color: #ffd7c2;
      box-shadow: 0 0 12px rgba(255, 106, 43, 0.28);
    }

    .btn.cyan-active {
      border-color: var(--cyan);
      background: rgba(56, 189, 248, 0.22);
      color: #e0f2fe;
      box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
    }

    /* 涂装色块按钮 */
    .swatch-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
    }

    .swatch-btn {
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 6px;
      padding: 6px 4px;
      background: rgba(15, 23, 42, 0.75);
      color: #cbd5e1;
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      transition: all 0.15s;
    }

    .swatch-btn:hover {
      border-color: #fff;
    }

    .swatch-btn.active {
      border-color: var(--amber);
      background: rgba(251, 191, 36, 0.14);
      color: #fff;
    }

    .swatch-dot {
      width: 22px;
      height: 8px;
      border-radius: 99px;
    }

    /* 底部战术动作栏 */
    .hud-bottom {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 16px;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0