fix: redesign earth hud interactions and legend behavior
This commit is contained in:
@@ -74,6 +74,7 @@ import {
|
||||
hideInfoCard,
|
||||
setInfoCardNoBorder,
|
||||
} from "./info-card.js";
|
||||
import { initLegend, setLegendMode } from "./legend.js";
|
||||
|
||||
export let scene;
|
||||
export let camera;
|
||||
@@ -194,6 +195,7 @@ function isSameCable(cable1, cable2) {
|
||||
}
|
||||
|
||||
function showCableInfo(cable) {
|
||||
setLegendMode("cables");
|
||||
showInfoCard("cable", {
|
||||
name: cable.userData.name,
|
||||
owner: cable.userData.owner,
|
||||
@@ -211,6 +213,7 @@ function showSatelliteInfo(props) {
|
||||
const perigee = (6371 * (1 - ecc)).toFixed(0);
|
||||
const apogee = (6371 * (1 + ecc)).toFixed(0);
|
||||
|
||||
setLegendMode("satellites");
|
||||
showInfoCard("satellite", {
|
||||
name: props?.name || "-",
|
||||
norad_id: props?.norad_cat_id,
|
||||
@@ -333,6 +336,7 @@ export function init() {
|
||||
|
||||
addLights();
|
||||
initInfoCard();
|
||||
initLegend();
|
||||
const earthObj = createEarth(scene);
|
||||
targetRotation = {
|
||||
x: earthObj.rotation.x,
|
||||
|
||||
Reference in New Issue
Block a user