- 新增可选 boosters 字段:一级仍登记含助推器的合计值,芯级由减法推导, 助推器分离与一级关机时序不再互相顶牛;无该字段时物理完全退回旧模型 - 物理循环抽到 physics.ts / stageSplit.ts,可用脚本批量验证全部型号时序 - 阿丽亚娜6 的一级本就是 P120C 助推组、长征六号甲公开推力口径矛盾, 两者不登记拆分,避免芯级重复计算或分离后推重比不足 - 仪表台删掉左下角环境卡,发动机仪表按真实直径比例逐舱画在同一行 - 管理端菜单预置服务幂等补入「火箭发射事件」,新增对应只读页面 |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .dockerignore | ||
| .gitignore | ||
| .npmrc | ||
| Dockerfile | ||
| README.md | ||
| eslint.config.js | ||
| index.html | ||
| package.json | ||
| postcss.config.js | ||
| tailwind.config.js | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| yarn.lock | ||
README.md
Cosmo Frontend
Frontend application for the Cosmo deep space explorer visualization system.
Tech Stack
- React 18
- TypeScript
- Vite (build tool)
- Three.js (3D rendering)
- @react-three/fiber (React Three.js integration)
- @react-three/drei (Three.js helpers)
- Tailwind CSS (styling)
- Axios (HTTP client)
Setup
- Install dependencies:
yarn install --ignore-engines
- Start development server:
yarn dev
The app will be available at http://localhost:5173/
Project Structure
src/
├── components/
│ ├── Scene.tsx # Main 3D scene
│ ├── CelestialBody.tsx # Individual celestial body renderer
│ └── Loading.tsx # Loading screen
├── hooks/
│ └── useSpaceData.ts # Data fetching hook
├── types/
│ └── index.ts # TypeScript types
├── utils/
│ └── api.ts # API utilities
├── App.tsx # Main app component
└── main.tsx # Entry point
Features
Current
- 3D visualization of the solar system
- Real-time data from NASA JPL Horizons
- Interactive camera controls (orbit, pan, zoom)
- Celestial bodies rendered at their current positions
- Stars background
Controls
- Left click + drag: Rotate camera
- Right click + drag: Pan camera
- Scroll wheel: Zoom in/out
Development Notes
- The app requires the backend API to be running at http://localhost:8000
- Uses yarn instead of npm due to dependency compatibility
- Node version 20+ recommended (use
--ignore-enginesflag if needed)
Next Steps
- Implement orbit line rendering
- Add time selector component
- Implement click-to-focus on celestial bodies
- Add information panels
- Load realistic textures and 3D models