The 3D Multi-File Enterprise Simulator PromptAct as a Principal Graphics Engineer and…
- User
The 3D Multi-File Enterprise Simulator PromptAct as a Principal Graphics Engineer and Systems Architect. I need to build a production-grade, multi-file 3D Airport FOD Detection & Mitigation Mission Control Dashboard using React, TypeScript, Tailwind CSS, and Three.js.You must architect this as an enterprise aviation safety tool. Ensure the codebase is clean, modular, and strictly typed.Please generate the entire project structure across these specific files:1. Dependencies Configuration (package.json)Update the existing configuration to include "three": "^0.160.0" and "@types/three": "^0.160.0" in the dependencies list so the system can compile WebGL components.2. Core 3D Geometry Types (src/types/fod.ts)Define strictly typed interfaces for: FODItem (id, position as [x, y, z], threat level HIGH | MEDIUM | LOW, item type, timestamp), AgentState (IDLE | SCANNING | DISPATCHED | INTERCEPTING | RETURNING), and SystemLog (timestamp, source, message, type INFO | WARNING | CRITICAL).3. 3D Telemetry Orchestrator (src/context/SimulationContext.tsx)Create a React Context serving as the centralized State Graph Engine.Drone Agent: Simulates an aerial flight path at an altitude vector (). Continuously streams grid coordinate scans down to the environment engine.Moderator Agent: The central supervisor. It prioritizes the global 3D threat matrix (High threat prioritized first, then closest Euclidean distance calculation ), assigns tracking IDs, and dispatches ground rovers.Rover Agent: Ground-level emergency units (). They calculate interception paths, dynamically advance their 3D position vectors toward the target, "clear" the debris object, and return to the base hangar coordinates.4. WebGL Viewport Component (src/components/RunwaySimulation3D.tsx)Initialize a Three.js scene using a WebGLRenderer, PerspectiveCamera, and proper lighting (AmbientLight + DirectionalLight for shadows).Render a high-fidelity 3D asphalt runway landing strip with landing zone markings and an illuminated coordinate boundary grid.Represent agents and objects using distinct 3D geometric meshes:Drones: Elevated glowing mesh cones or spheres moving dynamically along the flight deck ceiling.Rovers: Ground-level bounding box meshes shifting smoothly along the runway surface.FOD Hazards: Color-coded structural markers resting on the asphalt (Red = High Threat, Orange = Medium, Yellow = Low).Implement a safe animate/render loop that cleans up up all WebGL contexts, geometries, and materials on component unmount to prevent severe memory leaks in the browser.5. Operational Logging Hub (src/components/LogViewer.tsx)A real-time terminal window streaming formatted system events. Every warning, radar acquisition, and rover intercept must be completely timestamped and trace-auditable.6. Aviation Analytics Overview (src/components/MetricsDashboard.tsx)Display system performance cards: Active Runway Status, Total Volume of Debris Cleared, Fleet Allocation Percentage, and Mean Time to Resolution (MTTR).7. Layout Shell (src/App.tsx)Build the main dark-themed dark UI wrapper holding the 3D viewport canvas side-by-side with the metrics and logs. Include controls to manually inject random debris scenarios (e.g., "Simulate Runway Structural Delamination") to instantly test how the Moderator re-routes the active agents in 3D space.Make sure all modules hook into each other seamlessly with proper TypeScript imports so the whole engine initializes immediately in the Vite live preview window.
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.