Commit Graph

3 Commits

Author SHA1 Message Date
1852cafcac Flip orbit camera vertical drag to iPhone-style
Drag down now raises the camera so the galaxy shifts down with the cursor
(content follows finger). Horizontal was already correct (drag right moves
the scene right). Matches the feel of panning a map on iOS.
2026-06-04 12:33:04 -04:00
c14f684b09 Add galaxy parameter UI, star selection, and movement/physics scaffolding
Galaxy creation scene (Bevy 0.16):
- Split into module folder: params.rs, mod.rs (generation + spawn), ui.rs,
  selection.rs
- GalaxyParams resource (seed, count, arms, vertical_arms, size, twist,
  vertical_twist) with generation counter for change detection
- Control panel: 7 +/- slider rows + Regenerate button, no native Bevy slider
  widget so uses label + icon buttons
- Info panel: live-refreshes on selection change via despawn_related::<Children>
- Click-to-select: screen-space picking (project each star to viewport, closest
  within 18px threshold wins); selected star lerps scale to 2.2x
- Generation faithfully ports the docs TS reference including vertical arms
- Regeneration system: despawns GalaxyScene root only, preserves UI panels

Camera:
- Camera2d -> Camera3d + OrbitCamera (left-drag yaw/pitch, scroll zoom,
  pitch/distance clamped to avoid gimbal)
- Orbit drag suppressed when cursor over UI

New plugins (scaffolding):
- movement/: Velocity, MaxSpeed, TurnRate, Drag, MoveTarget, Player components
  + click-to-move (no player spawned yet)
- physics/: pure-data geometry (ray_vs_sphere, overlaps, separate,
  segment_vs_sphere) with 7 passing unit tests; no systems wired yet
- star_map/: plugin skeleton gated on AppState::InGame

Shared:
- ui/util.rs: cursor_over_ui helper for UI-hover detection
- docs: ARCH-9 decision record (custom movement & collision, no physics engine)
2026-06-04 12:29:33 -04:00
a7796a1394 Split Rust game src into modules; update AGENTS.md for dual toolchain
- Refactor apps/game/src/main.rs into modules: state.rs, camera.rs, ui/, gameplay/
- Add gameplay/galaxy_creation.rs scaffold (stubs only, no new logic)
- Update root AGENTS.md: separate TS workspace vs Rust game commands
- Update apps/AGENTS.md: docs/game/site use two toolchains, not one
- Add apps/game/AGENTS.md: build commands, module layout, naming conventions, Plugin pattern
2026-06-04 10:00:43 -04:00