You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds an option to render the asciiquarium widget with colorized glyphs.
Introduces `AsciiquariumPalette` to map glyphs to colors,
and adds a toggle in the demo to enable/disable colorized rendering
along with color customization controls.
When color is disabled or no palette is provided, the widget falls
back to plain text rendering.
Copy file name to clipboardExpand all lines: README.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,3 +160,72 @@ Tests cover:
160
160
- The original Perl Asciiquarium (Kirk Baucom) materials are archived under `archive/original/`.
161
161
- This crate provides an `egui`-based Rust implementation with a stateless, themeable widget design.
162
162
- ASCII art in this crate is a minimal starter set for demonstration. Expand or replace as needed per your project’s licensing requirements.
163
+
164
+
## Features
165
+
166
+
- Stateless egui widget: renders to a single monospace label string
167
+
- Deterministic animation loop with fixed timestep for smooth pacing
168
+
- Environment:
169
+
- Waterlines with subtle wave motion
170
+
- Seaweed with gentle sway
171
+
- Castle at bottom-right
172
+
- Ship at the surface; shark and whale underwater with spout animation
173
+
- Fish bubbles (desynced per fish)
174
+
- Fish behavior:
175
+
- Bounce physics with occasional direction variance on wall bounces
176
+
- Schools: groups traverse and despawn off-screen
177
+
- Orientation correction: fish ASCII auto-mirrors so they face their travel direction
178
+
- Despawn and respawn cycles for large entities (ship, shark, whale)
179
+
- Minimal defaults, no required configuration
180
+
- Tests and CI (rustfmt, clippy, build, test)
181
+
182
+
## Colorized rendering (optional)
183
+
184
+
By default, the widget renders a plain, single-color ASCII string. You can opt into a colorized renderer that maps certain glyphs to colors using a palette:
185
+
186
+
- Enable by setting `enable_color = true` and providing a `palette`
187
+
- Renders via an internal color `LayoutJob` while keeping the API unchanged
0 commit comments