Update README.md files for components, systems, and yachtpit crates with detailed module descriptions, usage examples, and architecture overviews.

This commit is contained in:
geoffsee
2025-07-03 12:11:31 -04:00
parent 3f694f4494
commit 7a23e55894
3 changed files with 157 additions and 10 deletions

View File

@@ -1,8 +1,66 @@
# yachtpit/crates/components
Provides components and rendering utilities for yachtpit.
# YachtPit Components Crate
The `components` crate provides reusable UI components and maritime instrument widgets for the YachtPit virtual yacht cockpit application.
## Overview
The `components` crate contains components and rendering primitives built on top of Bevy's engine.
This crate contains all the visual components and rendering primitives built on top of Bevy's UI system. It provides a comprehensive set of maritime instruments and displays that simulate real yacht cockpit equipment.
## Available Components
### Maritime Instruments
- **`SpeedGauge`** - Displays vessel speed in knots with analog gauge visualization
- **`DepthGauge`** - Shows water depth measurements with sonar-style display
- **`CompassGauge`** - Magnetic compass with heading display and cardinal directions
- **`WindDisplay`** - Wind speed and direction indicator with graphical representation
### Engine & Systems
- **`EngineStatus`** - Engine monitoring display showing RPM, temperature, and status
- **`SystemDisplay`** - General system status and monitoring interface
### Navigation Equipment
- **`NavigationDisplay`** - Chart plotter and navigation information display
- **`GpsIndicator`** - GPS status and position information
- **`RadarIndicator`** - Radar system status and basic display
- **`AisIndicator`** - AIS (Automatic Identification System) status and nearby vessels
### Core Components
- **`InstrumentCluster`** - Container for organizing multiple instruments
- **`VesselData`** - Data structures for vessel state and measurements
### UI Framework
- **`ui`** - Base UI utilities and common interface elements
- **`theme`** - Consistent theming and styling for maritime aesthetics
- **`composition`** - Layout and composition utilities for instrument arrangements
## Features
- **Realistic Maritime Aesthetics** - Components designed to mimic real yacht instruments
- **Bevy Integration** - Built on Bevy's ECS architecture for performance
- **Modular Design** - Each component can be used independently or combined
- **Responsive Layout** - Adapts to different screen sizes and orientations
- **Theme Consistency** - Unified visual design across all components
## Usage
This crate is designed to be used internally within the yachtpit project and is not published to crates.io. It exports foundational components used by the `systems` and `yachtpit` crates.
This crate is designed for internal use within the YachtPit project and is not published to crates.io. Components are imported and used by the `systems` and main `yachtpit` crates.
```rust
use components::{
SpeedGauge, DepthGauge, CompassGauge,
InstrumentCluster, VesselData
};
```
## Dependencies
- **Bevy 0.16** - Core engine and UI framework
- Built for cross-platform compatibility (Desktop, Web, Mobile)
## Architecture
Components follow Bevy's ECS (Entity-Component-System) pattern and are designed to be:
- **Composable** - Can be combined in different arrangements
- **Data-driven** - Respond to changes in vessel data automatically
- **Performance-oriented** - Optimized for real-time updates
- **Platform-agnostic** - Work across all supported platforms