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>山野策马:落日驿站</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background-color: #000;
            user-select: none;
        }

        #container {
            width: 100vw;
            height: 100vh;
        }

        /* 游戏界面 overlays */
        .overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: rgba(0, 0, 0, 0.7);
            color: #fff;
            z-index: 10;
            transition: opacity 0.5s ease;
        }

        .menu-card {
            background: rgba(20, 20, 20, 0.85);
            padding: 40px;
            border-radius: 12px;
            border: 2px solid #d4af37;
            text-align: center;
            max-width: 500px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            backdrop-filter: blur(5px);
        }

        h1 {
            color: #d4af37;
            margin-top: 0;
            font-size: 2.2em;
            letter-spacing: 2px;
        }

        p {
            line-height: 1.6;
            color: #ccc;
            font-size: 1.1em;
        }

        .btn {
            background: #d4af37;
            color: #111;
            border: none;
            padding: 12px 35px;
            font-size: 1.2em;
            font-weight: bold;
            border-radius: 6px;
            cursor: pointer;
            margin-top: 20px;
            transition: all 0.3s ease;
        }

        .btn:hover {
            background: #fff;
            box-shadow: 0 0 15px #d4af37;
        }

        /* HUD overlay */
        #hud {
            position: absolute;
            top: 20px;
            left: 20px;
            right: 20px;
            display: flex;
            justify-content: space-between;
            pointer-events: none;
            color: #fff;
            z-index: 5;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        }

        .hud-panel {
            background: rgba(0, 0, 0, 0.65);
            padding: 15px 20px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
            backdrop-filter: blur(5px);
        }

        .hud-title {
            font-size: 0.9em;
            color: #aaa;
            margin-bottom: 5px;
            text-transform: uppercase;
        }

        .hud-value {
            font-size: 1.6em;
            font-weight: bold;
        }

        /* 指南针 */
        #compass-container {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        #compass-arrow {
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-bottom: 30px solid #ff4757;
            margin-top: 5px;
            transform-origin: center 66%;
            transition: transform 0.1s linear;
        }

        /* 顶部中央天气变化提示 */
        #weather-notif {
            position: absolute;
            top: 120px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.7);
            color: #ffd700;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 1.1em;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.5s ease;
            z-index: 5;
        }

        /* 操作提示 */
        #controls-tip {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.6);
            color: #eee;
            padding: 10px 20px;
            border-radius: 5px;
            font-size: 0.9em;
           .........完整代码请登录后点击上方下载按钮下载查看

网友评论0