cosmo/frontend
mula.liu 54752484cc 火箭外形改为显式外观配置,修正星舰/电子号/猎鹰重型构型
- rocket_configs 新增 appearance(JSONB):助推器数量/每台发动机数/直径比/栅格翼/有无整流罩,留空仍按原启发式推断
- 预置型号补写外观并新增启动幂等回填;列不存在时跳过,避免服务起不来
- 3D 与示意图按构型绘制:猎鹰重型三根等直径芯级、星舰等径头锥+襟翼且无整流罩、电子号整流罩不再过大
- 管理端火箭表单新增「外观构型(可选)」页签
- deploy.sh 在补列后重启 backend,使启动期数据回填生效
2026-10-08 06:51:44 +08:00
..
public 大幅调整的一个版本,待测试 2025-12-04 21:43:43 +08:00
src 火箭外形改为显式外观配置,修正星舰/电子号/猎鹰重型构型 2026-10-08 06:51:44 +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