- Add MiniStarMap, NpcMarketPanel, ShipStatusPanel, useKeyboardShortcuts - Add progress bars for approach/mining operations and cargo fill indicator - Rewrite docs from spreadsheet-first to exploration-first open-world RPG - Replace dev:db + dev:standalone with unified dev script (scripts/dev.sh) - Add Vite chunk splitting for three.js and spacetimedb - Fix displayName dependency in useSpacetimeConnection - Remove stale usePlayerSession.ts - Add AGENTS.md files across all packages
1.4 KiB
1.4 KiB
apps/game/src/scene/ — 3D Rendering (React Three Fiber)
The 3D viewport for the game client. Renders the player's ship, surrounding space environment, stations, asteroids, and visual effects.
Files
| File | Purpose |
|---|---|
SpaceCanvas.tsx |
R3F Canvas wrapper. Fixed camera at [8,9,44], FOV 48. No user camera controls yet. |
SpaceEnvironment.tsx |
Background (#040712), fog, ambient light, two point lights (cyan + amber), animated star field (3600 stars) |
GameSpaceScene.tsx |
Main orchestrator. Renders stations, asteroid clusters, ship. Manages approach/mining operations. Interpolates ship position. Draws approach line (dashed cyan) and mining line (solid amber). Auto-completes operations via 120ms polling interval. |
StationMesh.tsx |
Torus ring + cylinder core + crossbar. Clickable. Selection ring when targeted. |
AsteroidMesh.tsx |
Icosahedron with tumble animation. Clickable. Selection ring when targeted. |
ShipMesh.tsx |
Cone (hull) + box (wings) + sphere (engine glow). Engine glow changes by flight mode. Subtle bob + roll animation. |
Visual Gaps
- No mining laser beam effect (flat Line only)
- No warp/travel animation
- No combat visuals (projectiles, shields, explosions)
- No NPC/other player ships
- No camera controls (orbit, zoom, pan)
- No sun/star light source
- No nebulae or system-specific skybox