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>烟雨江南 · 水乡漫游</title>
<style>
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { width: 100%; height: 100%; overflow: hidden; background: #0b0e14;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
  canvas { display: block; }
  .glass { background: rgba(13,16,24,.72); border: 1px solid rgba(255,255,255,.09);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.35); }

  #title { position: fixed; left: 20px; top: 16px; z-index: 5; pointer-events: none; }
  #title h1 { font-size: 22px; color: #f3f6fc; letter-spacing: 3px; font-weight: 700;
    text-shadow: 0 2px 14px rgba(0,0,0,.75); }
  #title p { font-size: 12px; color: #b9c6d8; margin-top: 5px; letter-spacing: 1px;
    text-shadow: 0 1px 8px rgba(0,0,0,.75); }

  #panel { position: fixed; right: 16px; top: 16px; z-index: 10; width: 232px; padding: 14px; }
  .sec { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .sec:last-child { border: none; padding-bottom: 0; margin-bottom: 0; }
  #weatherNow { display: flex; align-items: center; gap: 10px; }
  #wIcon { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
  #wName { font-size: 19px; color: #eef2f9; letter-spacing: 2px; }
  #wNext { font-size: 11.5px; color: #8fa2bc; margin: 7px 0 10px; }
  .row { display: flex; gap: 8px; }
  .row button { flex: 1; background: rgba(76,141,255,.14); border: 1px solid rgba(76,141,255,.4);
    color: #cfe0ff; font-size: 12px; padding: 7px 4px; border-radius: 9px; cursor: pointer; transition: .15s; }
  .row button:hover { background: rgba(76,141,255,.32); color: #fff; }
  .row button.active { background: #4c8dff; border-color: #4c8dff; color: #fff; }
  .chk { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px;
    color: #b9c6d8; cursor: pointer; }
  .chk input { accent-color: #4c8dff; width: 14px; height: 14px; }

  #help { position: fixed; left: 20px; bottom: 16px; z-index: 5; padding: 9px 16px;
    font-size: 12px; color: #c3cfdf; letter-spacing: .5px; }

  #toast { position: fixed; left: 50%; top: 74px; transform: translateX(-50%) translateY(-14px);
    z-index: 30; padding: 10px 22px; font-size: 14px; color: #eef2f9; letter-spacing: 1px;
    opacity: 0; pointer-events: none; transition: all .3s; }
  #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  #crosshair { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px;
    border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.8); z-index: 20; display: none; }
  #crosshair.show { display: block; }

  #overlay { position: fixed; inset: 0; z-index: 40; background: rgba(6,9,15,.45);
    display: none; align-items: center; justify-content: center; cursor: pointer; }
  #overlay.show { display: flex; }
  .ocard { text-align: center; padding: 34px 46px; color: #eef2f9; }
  .ocard .big { font-size: 44px; margin-bottom: 12px; }
  .ocard b { font-size: 19px; letter-spacing: 3px; }
  .ocard p { font-size: 12.5px; color: #a9b8cd; margin-top: 12px; line-height: 2; }
</style>
</head>
<body>

<div id="title">
  <h1>烟雨江南 · 水乡漫游</h1>
  <p>Three.js 全景水乡 · 随机天气 · 乌篷船 · 自由行走</p>
</div>

<div id="panel" class="glass">
  <div class="sec">
    <div id="weatherNow"><span id="wIcon">☀️</span><b id="wName">晴</b></div>
    <div id="wNext">⏳ --</div>
    <div class="row">
      <button id="wRandom">🎲 随机天气</button>
      <button id="wCycle">⏭ 下一个</button>
    </div>
    <label class="chk"><input type="checkbox" id="wAuto" checked><span>自动随机天气</span></label>
  </di.........完整代码请登录后点击上方下载按钮下载查看

网友评论0