I will list the files in the project root to understand the existing project structure and see what technologies are pre-installed.
I will read the package.json file to check the dependencies already installed in this project so we can determine if we need to install package like three, lucide-react, or others for the 3D globe and interactive dashboard.
I will install the necessary npm packages for this project: three (for rendering the interactive 3D globe) and lucide-react (for modern dashboard icons). I will use the install_npm_packages tool.
I will also install @types/three as a dependency to ensure we have full TypeScript autocomplete and type-safety while building our Three.js globe.
I will create a helper file src/utils/earthMap.ts containing the high-precision vector polygon coordinates of the world's continents, major city lights, and a procedural canvas renderer. This will generate a 2:1 equirectangular map texture for our Three.js globe. Having this self-contained means the application loads instantly, operates offline, and looks like a futuristic radar map. I'll use the create_file tool.
I will create src/utils/flights.ts which will define our flight database and mathematical algorithms. This file will handle conversion from lat/lon to 3D Cartesian vectors, Spherical Linear Interpolation (Slerp) for the flight paths, dynamic bearing/heading calculations, and will include a rich set of 25+ pre-seeded flights. It will also contain a seeded pseudo-random number generator so that any searched flight number dynamically compiles into a fully detailed, realistic, and consistent tracking dashboard. I will use the create_file tool.
I will create the missing file src/utils/seedRandom.ts which implements the seed-based pseudo-random number generator used to create consistent flight profiles. I will use the create_file tool.
I will create the EarthGlobe.tsx component inside src/components/. This component will initialize a high-performance WebGL context via vanilla Three.js on a Canvas element. It will features a custom-built orbital camera controller (supporting click-and-drag rotation, scroll zooming, and inertial damping), dynamic procedural texturing of the Earth with custom skins (Cyber Grid, Tactical Green Radar, Physical Earth), and real-time Great-Circle route arcs. It will also render a stylized, low-poly 3D passenger jet flying on the model that automatically aligns its 3D pitch/yaw/roll with its heading and the Earth's curved horizon. It will also calculate 3D-to-2D screen projections to float HTML labels over airports. I will use the create_file tool.
I will edit the src/components/EarthGlobe.tsx file to fix the TypeScript compilation issues. I will clean up the unused imports, handle potential null pointer dereferences on canvasRef.current, and make sure everything is perfectly typed. I'll use the edit_file tool.
I will read the bottom section of src/components/EarthGlobe.tsx to inspect the exact lines causing compilation errors so I can replace them accurately and ensure the file compiles perfectly.
I will read the remaining lines from 750 to the end of src/components/EarthGlobe.tsx to get the context of the rest of the component and complete our fixes.
I will edit src/components/EarthGlobe.tsx to solve all remaining compilation errors. I will:
- Make sure
simulationSpeed is used to adjust auto-rotation speed, solving the unused parameter warning.
- Remove the reference to
hoveredLabel in the JSX rendering, making it compile perfectly.
- Ensure that
canvasRef.current is safely guarded and stored as canvas before invoking getBoundingClientRect().
I will use the edit_file tool.
I will edit src/components/EarthGlobe.tsx to handle the canvasRef.current safety check and remove the obsolete hoveredLabel reference in the rendering section, solving the final two compilation errors in this component. I will use the edit_file tool.
I will replace the reference to hoveredLabel in src/components/EarthGlobe.tsx with a clean opacity-100 class so that the labels are always visible and compile perfectly. I'll use the edit_file tool.
I will create the InstrumentPanel.tsx component in src/components/. This component will render a high-tech glass-cockpit flight deck overlay. It will feature:
- An animated SVG Compass Rose that rotates in real-time to match the flight's current heading (e.g. 294° NW).
- A Digital Speed Dial showing current velocity in knots and km/h.
- An Altitude Level Gauge showing height above sea level, with a mini climbing indicator.
- An Artificial Horizon / Attitude Indicator (sky-ground horizon) which pivots based on flight status and elapsed time to simulate pitch and roll.
- Interactive Pilot Logs and SATCOM status indicators displaying real-time scrolling ATC communications and system diagnostics.
I will use the
create_file tool.
I will edit src/components/InstrumentPanel.tsx to clean up the three unused icons (ShieldAlert, HelpCircle, and AlertCircle) and resolve the TypeScript warnings. I will use the edit_file tool.
I will read the index.html file to see where the document title and description are configured, so I can update them to match our professional, futuristic Aero-Globe 3D radar flight tracker.
I will update the index.html file to change the title of the website to "AERO-GLOBE 3D | Live Interactive Flight Radar" and add a default dark background color to prevent any white loading flicker. I will use the edit_file tool.
I will read src/App.tsx to understand the default code so I can replace it with our main application dashboard layout. I will use the read_file tool.
I will replace the main src/App.tsx component. This will house our application container, managing the list of flights, the simulation timer (which updates flight progress, coordinates, headings, and distances smoothly at a 100ms frequency), search inputs, active selection trackers, theme selectors, mobile responsive state, and simulation speed adjustments. It will also render the interactive sidebar and main panels. I'll use the create_file tool.
I will edit src/App.tsx to remove the unused imports (AIRPORTS, Compass, Maximize2, and Minimize2) to ensure clean compilation and type-safety. I'll use the edit_file tool.
I will run the build_project tool to check if the application builds successfully and compile any type errors or packaging checks.
I have successfully created and built AERO-GLOBE 3D, a highly interactive, WebGL-powered flight tracking and radar dashboard using React, Vite, Three.js, and Tailwind CSS.
The project compiles with zero warnings or errors. Here is a summary of the advanced features and architectural implementations integrated into the application:
🚀 Key Features Built
-
Self-Contained 3D Interactive Globe
- Built on vanilla Three.js inside React to avoid common React 19 compatibility issues with external libraries.
- Features custom-built Orbital Camera Controls supporting click-and-drag rotation, scrolling to zoom, and mobile touch swipe controls.
- Includes Atmospheric Glow Effects, lighting rigs (directional sun-style lights and cyan-blue fill highlights), and a Starry Particle Field (800+ individual coordinate-projected stars).
-
Procedural Earth Skin Texturing
- Generates and renders a 2048×1024 high-resolution equirectangular world map in-memory using an HTML Canvas element. This avoids external server dependencies, meaning the application loads in milliseconds and runs fully offline.
- Offers three visual themes selectable on the fly:
- Cyber Grid (Default): Sleek neon-blue outlines with graticule lines and bright city lights on the dark hemisphere.
- CRT Radar Screen: Green phosphor CRT scanline aesthetic reminiscent of vintage air-traffic control monitors.
- Physical Earth: Natural dark-green landmasses, blue oceans, and golden urban nodes.
-
Intelligent Flight Telemetry & Math
- Great-Circle Trajectories: Uses Spherical Linear Interpolation (Slerp) to calculate the curved paths of flights over the curved surface of the Earth.
- Horizon Aligned 3D Aircraft Model: Rather than heavy GLTF files, a sleek low-poly passenger jet is constructed procedurally from Three.js primitives. At each frame, a custom 3D Orthonormal Basis Matrix aligns the jet's roll/pitch/yaw to remain parallel to the Earth's curved horizon and point exactly tangent to the flight path (matching its heading on the model).
- Real-Life Heading Calculation: Dynamically computes the geodesic bearing in degrees (0–359°) using the Haversine formula from its current lat/lon coordinates to the next segment of the flight.
-
Dynamic Search & Simulation Directory
- Global Directory Sidebar: Categorizes pre-seeded commercial flights into "All", "In Flight ✈️", and "Parked 🅿️".
- Deterministic Seeded PRNG: If a user searches for any custom flight number (e.g. , , or ), the application uses a custom-seeded pseudo-random number generator to dyamically generate realistic airports, speeds, passenger counts, and route vectors.
📂 File Structure Created
src/utils/seedRandom.ts — Contains the cyrb128 + sfc32 seedable random number generator.
src/utils/earthMap.ts — Houses coordinate maps for continents, major cities, and the procedural equirectangular skin canvas renderer.
src/utils/flights.ts — Contains major airport coordinates, Slerp interpolation algorithms, and bearing/heading math.
src/components/EarthGlobe.tsx — Initializes the Three.js WebGL canvas, particle stars, light sources, 3D path drawing, dynamic plane vector alignments, and 3D-to-2D screen coordinate projections to float HTML labels over cities.
src/components/InstrumentPanel.tsx — Renders the glass cockpit dials, rotating compass card, artificial attitude horizon, air-traffic control radio, and weather logs.
src/App.tsx — Serves as the central state hub, handling the 100ms high-frequency simulation loop, stats trackers, search bars, and the responsive grid layout.
index.html — Updated with custom titles and optimized dark style loading.
Files built: src/utils/earthMap.ts, src/utils/flights.ts, src/utils/seedRandom.ts, src/components/EarthGlobe.tsx, src/components/InstrumentPanel.tsx, index.html, src/App.tsx