feat(earth): toolbar and zoom improvements

- Add box-sizing/padding normalization to toolbar buttons
- Remove zoom slider, implement click/hold zoom behavior (+/- buttons)
- Add 10% step on click, 1% continuous on hold
- Fix satellite init: show satellite points immediately, delay trail visibility
- Fix breathing effect: faster pulse, wider opacity range
- Add toggle-cables functionality with visibility state
- Initialize satellites and cables as visible by default
This commit is contained in:
linkong
2026-03-20 17:13:02 +08:00
parent 96222b9e4c
commit 49a9c33836
8 changed files with 103 additions and 58 deletions

View File

@@ -92,7 +92,7 @@ function applyCableVisualState() {
switch (state) {
case CABLE_STATE.LOCKED:
c.material.opacity = 0.3 + pulse * 0.7;
c.material.opacity = CABLE_CONFIG.lockedOpacityMin + pulse * (CABLE_CONFIG.lockedOpacityMax - CABLE_CONFIG.lockedOpacityMin);
c.material.color.setRGB(1, 1, 1);
break;
case CABLE_STATE.HOVERED:
@@ -201,6 +201,8 @@ async function loadData(showWhiteSphere = false) {
console.log(`卫星数据加载完成: ${satCount}`);
updateSatellitePositions();
console.log('卫星位置已更新');
toggleSatellites(true);
console.log('卫星已显示');
} catch (error) {
console.error('加载数据失败:', error);
showStatusMessage('加载数据失败: ' + error.message, 'error');