Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78bb639a83 |
@@ -38,7 +38,7 @@
|
||||
|
||||
<div id="right-toolbar-group">
|
||||
<div id="zoom-toolbar">
|
||||
<button id="reset-view" class="zoom-btn">📍</button>
|
||||
<button id="reset-view" class="zoom-btn">🎯</button>
|
||||
<button id="zoom-in" class="zoom-btn">+</button>
|
||||
<span id="zoom-value" class="zoom-percent">100%</span>
|
||||
<button id="zoom-out" class="zoom-btn">−</button>
|
||||
@@ -49,7 +49,7 @@
|
||||
<button id="rotate-toggle" class="toolbar-btn" title="自动旋转">🔄<span class="tooltip">自动旋转</span></button>
|
||||
<button id="toggle-cables" class="toolbar-btn active" title="显示/隐藏线缆">🌐<span class="tooltip">隐藏线缆</span></button>
|
||||
<button id="toggle-terrain" class="toolbar-btn" title="显示/隐藏地形">⛰️<span class="tooltip">显示/隐藏地形</span></button>
|
||||
<button id="toggle-satellites" class="toolbar-btn active" title="显示/隐藏卫星">🛰️<span class="tooltip">隐藏卫星</span></button>
|
||||
<button id="toggle-satellites" class="toolbar-btn" title="显示/隐藏卫星">🛰️<span class="tooltip">显示卫星</span></button>
|
||||
<button id="toggle-trails" class="toolbar-btn" title="显示/隐藏轨迹">✨<span class="tooltip">显示/隐藏轨迹</span></button>
|
||||
<button id="reload-data" class="toolbar-btn" title="重新加载数据">🔃<span class="tooltip">重新加载数据</span></button>
|
||||
</div>
|
||||
|
||||
@@ -201,8 +201,6 @@ async function loadData(showWhiteSphere = false) {
|
||||
console.log(`卫星数据加载完成: ${satCount} 颗`);
|
||||
updateSatellitePositions();
|
||||
console.log('卫星位置已更新');
|
||||
toggleSatellites(true);
|
||||
console.log('卫星已显示');
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error);
|
||||
showStatusMessage('加载数据失败: ' + error.message, 'error');
|
||||
|
||||
@@ -7,9 +7,8 @@ import { CONFIG, SATELLITE_CONFIG } from './constants.js';
|
||||
let satellitePoints = null;
|
||||
let satelliteTrails = null;
|
||||
let satelliteData = [];
|
||||
let showSatellites = true;
|
||||
let showSatellites = false;
|
||||
let showTrails = true;
|
||||
let trailsReady = false;
|
||||
let animationTime = 0;
|
||||
let selectedSatellite = null;
|
||||
let satellitePositions = [];
|
||||
@@ -321,10 +320,6 @@ export function updateSatellitePositions(deltaTime = 0) {
|
||||
|
||||
satelliteTrails.geometry.attributes.position.needsUpdate = true;
|
||||
satelliteTrails.geometry.attributes.color.needsUpdate = true;
|
||||
|
||||
if (!trailsReady && count > 0 && satellitePositions[0]?.trail.length >= TRAIL_LENGTH) {
|
||||
trailsReady = true;
|
||||
}
|
||||
}
|
||||
|
||||
export function toggleSatellites(visible) {
|
||||
@@ -333,14 +328,14 @@ export function toggleSatellites(visible) {
|
||||
satellitePoints.visible = visible;
|
||||
}
|
||||
if (satelliteTrails) {
|
||||
satelliteTrails.visible = visible && showTrails && trailsReady;
|
||||
satelliteTrails.visible = visible && showTrails;
|
||||
}
|
||||
}
|
||||
|
||||
export function toggleTrails(visible) {
|
||||
showTrails = visible;
|
||||
if (satelliteTrails) {
|
||||
satelliteTrails.visible = visible && showSatellites && trailsReady;
|
||||
satelliteTrails.visible = visible && showSatellites;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user