cosmo/frontend
mula.liu fc749505a5 一级参数拆分助推器口径,发射台发动机仪表移到左侧并新增火箭发射事件页
- 新增可选 boosters 字段:一级仍登记含助推器的合计值,芯级由减法推导,
  助推器分离与一级关机时序不再互相顶牛;无该字段时物理完全退回旧模型
- 物理循环抽到 physics.ts / stageSplit.ts,可用脚本批量验证全部型号时序
- 阿丽亚娜6 的一级本就是 P120C 助推组、长征六号甲公开推力口径矛盾,
  两者不登记拆分,避免芯级重复计算或分离后推重比不足
- 仪表台删掉左下角环境卡,发动机仪表按真实直径比例逐舱画在同一行
- 管理端菜单预置服务幂等补入「火箭发射事件」,新增对应只读页面
2026-10-08 08:47:58 +08:00
..
public 大幅调整的一个版本,待测试 2025-12-04 21:43:43 +08:00
src 一级参数拆分助推器口径,发射台发动机仪表移到左侧并新增火箭发射事件页 2026-10-08 08:47:58 +08:00
.dockerignore v1.0.1 2025-12-02 21:13:13 +08:00
.gitignore 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
.npmrc 优化了部署文件,使用国内镜像 2025-12-02 22:18:32 +08:00
Dockerfile 大幅调整的一个版本,待测试 2025-12-04 22:05:35 +08:00
README.md 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
eslint.config.js 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
index.html 大幅调整的一个版本,待测试 2025-12-04 21:43:43 +08:00
package.json 1.1.0 2026-07-21 20:09:51 +08:00
postcss.config.js 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
tailwind.config.js 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
tsconfig.app.json 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
tsconfig.json 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
tsconfig.node.json 初步完成了太阳系内的行星显示 2025-11-27 13:16:19 +08:00
vite.config.ts 1.1.0 2026-07-21 20:09:51 +08:00
yarn.lock 1.1.0 2026-07-21 20:09:51 +08:00

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

  1. Install dependencies:
yarn install --ignore-engines
  1. 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-engines flag 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