diff --git a/frontend/public/earth/js/constants.js b/frontend/public/earth/js/constants.js index d72ff709..79a796b1 100644 --- a/frontend/public/earth/js/constants.js +++ b/frontend/public/earth/js/constants.js @@ -53,6 +53,13 @@ export const CABLE_STATE = { LOCKED: 'locked' }; +export const SATELLITE_CONFIG = { + maxCount: 2000, + dotSize: 1.5, + trailLength: 30, + apiPath: '/api/v1/visualization/geo/satellites' +}; + export const GRID_CONFIG = { latitudeStep: 10, longitudeStep: 30, diff --git a/frontend/public/earth/js/satellites.js b/frontend/public/earth/js/satellites.js index 0ca67533..60b6c879 100644 --- a/frontend/public/earth/js/satellites.js +++ b/frontend/public/earth/js/satellites.js @@ -2,7 +2,7 @@ import * as THREE from 'three'; import { twoline2satrec, sgp4, propagate, degreesToRadians, radiansToDegrees, eciToGeodetic } from 'satellite.js'; -import { CONFIG } from './constants.js'; +import { CONFIG, SATELLITE_CONFIG } from './constants.js'; let satellitePoints = null; let satelliteTrails = null; @@ -15,9 +15,9 @@ let satellitePositions = []; let hoverRingSprite = null; let lockedRingSprite = null; -const SATELLITE_API = '/api/v1/visualization/geo/satellites?limit=2000'; -const MAX_SATELLITES = 2000; -const TRAIL_LENGTH = 30; +const SATELLITE_API = SATELLITE_CONFIG.apiPath + '?limit=' + SATELLITE_CONFIG.maxCount; +const MAX_SATELLITES = SATELLITE_CONFIG.maxCount; +const TRAIL_LENGTH = SATELLITE_CONFIG.trailLength; const DOT_TEXTURE_SIZE = 32; function createCircularDotTexture() { @@ -75,7 +75,7 @@ export function createSatellites(scene, earthObj) { pointsGeometry.setAttribute('color', new THREE.BufferAttribute(colors, 3)); const pointsMaterial = new THREE.PointsMaterial({ - size: 1.5, + size: SATELLITE_CONFIG.dotSize, map: dotTexture, vertexColors: true, transparent: true,