three实现全球三维地球收音电台交互效果代码

代码语言:html

所属分类:三维

代码描述:three实现全球三维地球收音电台交互效果代码,点击点点可收听电台,国内网络可能不行。

代码标签: three 全球 三维 地球 收音 电台 交互

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D Radio Globe</title>
    <style>
        body { margin: 0; overflow: hidden; background-color: #000; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: white; }
        #canvas-container { width: 100vw; height: 100vh; }
        
        /* UI Overlay */
        #ui-layer {
            position: absolute;
            top: 20px;
            left: 20px;
            pointer-events: none; /* Let clicks pass through to the canvas */
            z-index: 10;
        }
        h1 { margin: 0; text-transform: uppercase; letter-spacing: 2px; font-size: 24px; text-shadow: 0 0 10px #00ffcc; }
        p { font-size: 14px; color: #aaa; max-width: 300px; }

        /* Player Controls */
        #player {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20, 20, 30, 0.9);
            padding: 15px 25px;
            border-radius: 30px;
            border: 1px solid #444;
            display: flex;
            align-items: center;
            gap: 20px;
            backdrop-filter: blur(5px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            transition: all 0.3s ease;
            opacity: 0;
            pointer-events: auto;
        }
        #player.active { opacity: 1; bottom: 50px; }
        
        .station-info { display: flex; flex-direction: column; }
        .station-name { font-weight: bold; color: #00ffcc; }
        .station-loc { font-size: 0.8em; color: #ccc; }
        
        .status-indicator {
            width: 10px; height: 10px; background: #555; border-radius: 50%;
            box-shadow: 0 0 5px #555;
        }
        .playing .status-indicator { background: #0f0; box-shadow: 0 0 10px #0f0; animation: pulse 1.5s infinite; }
        
        @keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

        /* Loading Overlay */
        #loader {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: #000; display: flex; justify-content: center; align-items: center;
            z-index: 999; transition: opacity 0.5s;
        }
        .spinner { width: 40px; height: 40px; border: 4px solid .........完整代码请登录后点击上方下载按钮下载查看

网友评论0