Adds real-time visualization of traffic flow between user locations and data centers on the 3D globe: - Implements arc animations for traffic visualization - Adjusts globe colors and atmosphere for better visibility - Adds data center (colo) location mapping - Centers initial view on user's current location - Improves mobile responsiveness and layout - Adds cleanup handling for globe resources Performance and UX improvements: - Optimizes globe rotation speed and controls - Updates time picker layout with logical grouping - Enhances responsive design for dashboard components
19 lines
578 B
JavaScript
19 lines
578 B
JavaScript
import { writeFileSync } from 'node:fs'
|
|
import { join } from 'node:path'
|
|
|
|
async function main() {
|
|
const locations = await fetch('https://raw.githubusercontent.com/Netrvin/cloudflare-colo-list/refs/heads/main/locations.json')
|
|
if (!locations.ok) {
|
|
throw new Error('Failed to fetch locations')
|
|
}
|
|
const colos = await locations.json()
|
|
writeFileSync(join(import.meta.dirname, '../public/colos.json'), JSON.stringify(colos.reduce((acc, c) => {
|
|
acc[c.iata] = {
|
|
lat: c.lat,
|
|
lon: c.lon,
|
|
}
|
|
return acc
|
|
}, {}), 'utf8'))
|
|
}
|
|
|
|
main().catch(console.error)
|