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>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
            overflow: hidden;
        }
        #container {
            width: 100vw;
            height: 100vh;
            position: relative;
        }
        #canvas {
            width: 100%;
            height: 100%;
            display: block;
        }
        #controls {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(255, 255, 255, 0.95);
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
            max-width: 380px;
            z-index: 100;
            backdrop-filter: blur(10px);
        }
        h2 {
            margin-bottom: 20px;
            color: #2c3e50;
            font-size: 20px;
            text-align: center;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
        }
        .input-group {
            margin-bottom: 18px;
        }
        label {
            display: block;
            margin-bottom: 8px;
            color: #34495e;
            font-size: 14px;
            font-weight: 600;
        }
        input, select {
            width: 100%;
            padding: 10px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s;
        }
        input:focus, select:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }
        .coords-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        button {
            width: 100%;
            padding: 14px;
            margin-top: 15px;
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: bold;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
        }
        button:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
        }
        button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        #downloadBtn {
            background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
            box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
        }
        #downloadBtn:hover {
            box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
        }
        #status {
            margin-top: 15px;
            padding: 12px;
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            border-radius: 8px;
            font-size: 13px;
            color: white;
            text-align: center;
            font-weight: 600;
            display: none;
        }
        .hint {
            font-size: 12px;
            color: #7f8c8d;
            margin-top: 15px;
            text-align: center;
            padding-top: 15px;
            border-top: 1px solid #ecf0f1;
        }
    </style>
</head>
<body>
    <div id="container">
        <canvas id="canvas"></canvas>
        <div id="controls">
            <h2>✈️ 飞行轨迹生成器</h2>
            
            <div class="input-group">
                <label>🛫 起点城市</label>
                <select id="startCity">
                    <option value="39.9042,116.4074">北京 Beijing</option>
                    <option value="31.2304,121.4737">上海 Shanghai</option>
                    <option value="23.1291,113.2644">广州 Guangzhou</option>
                    <option value="22.3193,114.16.........完整代码请登录后点击上方下载按钮下载查看

网友评论0