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>潮汐防线 · Tidal Bulwark (Hard)</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@600;900&display=swap" rel="stylesheet">
<style>
  * { margin:0; padding:0; box-sizing:border-box; }
  html,body { height:100%; overflow:hidden; background:#0a1420; user-select:none;
    font-family:-apple-system,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif; }
  canvas.gl { position:fixed; inset:0; display:block; }
  .serif { font-family:'Noto Serif SC','Songti SC',serif; }

  /* ---------- HUD ---------- */
  #hud { position:fixed; inset:0; pointer-events:none; z-index:10; color:#ece5d4; }
  .panel { pointer-events:auto; background:rgba(9,16,26,.74); border:1px solid rgba(233,196,138,.26);
    border-radius:12px; backdrop-filter:blur(10px); padding:10px 14px; box-shadow:0 6px 24px rgba(0,0,0,.35); }
  .hud-top { position:absolute; top:14px; left:14px; right:14px; display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }

  #wavePanel { min-width:210px; }
  #wavePanel .wrow { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
  #wavePanel .wlabel { font-size:13px; letter-spacing:.14em; color:#c9b995; }
  #wavePanel .wlabel b { font-size:20px; color:#f0d9a6; font-family:'Noto Serif SC',serif; }
  #phaseText { font-size:13px; margin-top:2px; color:#dfd6c2; }
  #phaseText.surge { color:#ff8d73; font-weight:700; }
  #phaseCount { font-size:12px; color:#9aa5ac; font-variant-numeric:tabular-nums; }
  #tideGauge { display:block; margin-top:6px; }

  #resPanel { min-width:230px; }
  .res-row { display:flex; align-items:center; gap:9px; font-size:14px; }
  .res-row + .res-row { margin-top:8px; }
  .res-row svg { flex:none; color:#e9c48a; }
  .res-row b { font-size:19px; color:#f0d9a6; font-variant-numeric:tabular-nums; }
  .res-row span.cap { color:#8f978f; font-size:12px; }
  .res-bar { flex:1; height:5px; border-radius:3px; background:rgba(255,255,255,.12); overflow:hidden; }
  .res-bar i { display:block; height:100%; width:60%; background:linear-gradient(90deg,#c8a15f,#efd28e); border-radius:3px; transition:width .2s; }
  .res-row.flash b { color:#ff7a5c; }
  #houseIcons { display:flex; gap:3px; }
  #houseIcons svg { width:15px; height:15px; }
  #houseIcons .h-ok   { color:#9ec98a; }
  #houseIcons .h-hurt { color:#e5c06a; }
  #houseIcons .h-dang { color:#f0876a; animation:blink 0.7s infinite; }
  #houseIcons .h-dead { color:#4b4f57; }
  @keyframes blink { 50% { opacity:.35; } }

  .hud-bottom { position:absolute; bottom:16px; left:0; right:0; display:flex; flex-direction:column; align-items:center; gap:9px; }
  .toolbar { display:flex; gap:8px; pointer-events:auto; }
  .tool { display:flex; align-items:center; gap:7px; padding:9px 16px; border-radius:10px; cursor:pointer;
    background:rgba(9,16,26,.74); color:#cfc6b0; border:1px solid rgba(233,196,138,.26); font-size:14px;
    backdrop-filter:blur(10px); transition:.15s; }
  .tool:hover { border-color:rgba(233,196,138,.6); color:#f0e6cc; }
  .tool.active { background:rgba(200,160,90,.24); border-color:#e9c48a; color:#ffe9bd; }
  .tool kbd { font-size:11px; padding:1px 5px; border-radius:4px; border:1px solid rgba(255,255,255,.25); color:#a8a191; }
  #hint { font-size:12.5px; color:rgba(236,229,212,.78); text-shadow:0 1px 4px rgba(0,0,0,.6); letter-spacing:.05em; }

  /* ---------- 横幅 / 提示 ---------- */
  #banner { position:fixed; top:22%; left:0; right:0; text-align:center; z-index:20; pointer-events:none;
    opacity:0; }
  #banner.show { animation:bannerIn 2.8s ease forwards; }
  #banner span { display:inline-block; font-family:'Noto Serif SC',serif; font-weight:900; font-size:44px;
    color:#ffe4b8; letter-spacing:.28em; text-shadow:0 2px 18px rgba(0,0,0,.55),0 0 2px rgba(0,0,0,.8); }
  #banner.danger span { color:#ffb09a; }
  #banner::before, #banner::after { content:''; display:block; width:220px; height:1px; margin:10px auto;
    background:linear-gradient(90deg,transparent,rgba(255,220,170,.8),transparent); }
  @keyframes bannerIn { 0%{opacity:0; transform:translateY(14px);} 12%{opacity:1; transform:none;}
    80%{opacity:1;} 100%{opacity:0;} }

  #toasts { position:fixed; top:86px; left:50%; transform:translateX(-50%); z-index:25; display:flex;
    flex-direction:column; gap:7px; align-items:center; pointer-events:none; }
  .toast { padding:7px 18px; border-radius:9px; font-size:13.5px; color:#f0e8d5;
    background:rgba(9,16,26,.82); border:1px solid rgba(233,196,138,.3); animation:toastIn .25s ease; }
  .toast.bad { border-color:rgba(255,120,90,.55); color:#ffc4b3; }
  .toast.warn { color:#ffe1a8; }
  .toast.out { opacity:0; transition:opacity .4s; }
  @keyframes toastIn { from { opacity:0; transform:translateY(-6px); } }

  /* ---------- 菜单 / 结算 ---------- */
  .overlay { position:fixed; inset:0; z-index:40; display:flex; align-items:center; justify-content:center;
    background:rgba(5,10,18,.58); backdrop-filter:blur(3px); transition:opacity .5s; }
  .overlay.hidden { opacity:0; pointer-events:none; }
  .card { max-width:560px; width:calc(100% - 40px); padding:38px 42px; text-align:center; color:#ece5d4;
    background:rgba(9,16,26,.82); border:1px solid rgba(233,196,138,.3); border-radius:16px;
    box-shadow:0 20px 70px rgba(0,0,0,.5); }
  .eyebrow { font-size:11px; letter-spacing:.5em; color:#a4906a; margin-bottom:10px; }
  .card h1 { font-family:'Noto Serif SC',serif; font-weight:900; font-size:46px; letter-spacing:.18em;
    color:#f4dfae; margin-bottom:6px; }
  .card .sub { font-size:12px; color:#8d8474; letter-spacing:.3em; margin-bottom:20px; }
  .card p.desc { font-size:14.5px; line-height:1.9; color:#c9c0ab; margin-bottom:24px; text-align:left; }
  .tips { display:flex; flex-direction:column; gap:12px; margin-bottom:28px; text-align:left; }
  .tips .tip { display:flex; gap:12px; align-items:flex-start; }
  .tips svg { flex:none; color:#e9c48a; margin-top:2px; }
  .tips b { color:#f0d9a6; font-size:14px; display:block; margin-bottom:2px; }
  .tips span { font-size:13px; color:#a9a08c; line-height:1.6; }
  .btn { display:inline-block; padding:13px 46px; font-size:16px; letter-spacing:.3em; text-indent:.3em;
    color:#f4dfae; background:transparent; border:1px solid #d9b26e; border-radius.........完整代码请登录后点击上方下载按钮下载查看

网友评论0