diff --git a/README.md b/README.md index 8375ee0..f734739 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ A modern turtle graphics library for Rust built on [Macroquad](https://macroquad - ⚡ **Smooth Animations**: Tweening support with easing functions and live fill preview - 🚀 **Instant Mode**: Execute commands immediately without animation (speed ≥ 999) - 🎯 **High-Quality Rendering**: Complete Lyon tessellation pipeline with GPU acceleration -- **Multi-Contour Fills**: Automatic hole detection with EvenOdd fill rule - draw cheese with holes! +- 🫟 **Multi-Contour Fills**: Automatic hole detection with EvenOdd fill rule - draw cheese with holes! - 📐 **Self-Intersecting Paths**: Stars, complex shapes - all handled correctly - 🐢 **Multiple Turtle Shapes**: Triangle, classic turtle, circle, square, arrow, and custom shapes - 🔍 **Structured Logging**: Optional `tracing` integration for debugging (zero overhead when disabled) @@ -291,19 +291,6 @@ turtle-lib/src/ - **Dynamic Speed Control**: Speed managed via SetSpeed commands for flexibility - **Tweening System**: Smooth interpolation with easing functions - **Unified Lyon Rendering**: All drawing operations use GPU-accelerated Lyon tessellation - - Lines, arcs, circles, fills - single high-quality rendering pipeline - - ~410 lines of code eliminated through architectural simplification - - Consistent quality across all primitives - -### Command Consolidation - -The library uses consolidated commands to reduce code duplication: - -- **Move(distance)**: Replaces separate Forward/Backward (negative = backward) -- **Turn(angle)**: Replaces separate Left/Right (negative = left, positive = right) -- **Circle{direction, ...}**: Unified circle command with CircleDirection enum - -This design eliminates ~250 lines of duplicate code while maintaining the same user-facing API. ## Workspace Structure @@ -329,26 +316,20 @@ cargo build --release ## Development Status ### ✅ Completed -- Complete Lyon integration for all drawing primitives -- Multi-contour fill system with automatic hole detection -- Turtle movement and rotation (consolidated Move/Turn commands) -- Circle arcs (left/right with unified Circle command) -- Pen control (up/down) with contour management -- Color and pen width -- Multiple turtle shapes with custom shape support -- Tweening system with easing functions -- Dynamic speed control via SetSpeed commands -- Instant mode (speed ≥ 999) and animated mode (speed < 999) +- **Turtle movement** and rotation (consolidated Move/Turn commands) +- **Pen control** (up/down) with contour management +- **Color** and **pen width** +- **Circle arcs** (left/right with unified Circle command) +- **Dynamic speed control** via SetSpeed commands +- **Instant mode** (speed ≥ 999) and animated mode (speed < 999) +- **Multi-contour fill** system with automatic hole detection +- **Lyon integration** for all drawing primitives +- **Multiple turtle shapes** with custom shape support +- **Tweening** system with easing functions - **EvenOdd fill rule** for complex self-intersecting paths - **Live fill preview** during animation with progressive rendering - **Multi-contour support** - pen_up/pen_down manage contours -- **Command consolidation** (~250 lines eliminated) -- **Full Lyon migration** (~410 total lines eliminated) - -### 🎯 Future Possibilities -- Advanced stroke styling (caps, joins, dashing) -- Bezier curves and custom path primitives -- Additional examples and tutorials +- **Command consolidation** ## What's New diff --git a/turtle-lib/examples/yinyang.rs b/turtle-lib/examples/yinyang.rs index 56192fa..114b6d0 100644 --- a/turtle-lib/examples/yinyang.rs +++ b/turtle-lib/examples/yinyang.rs @@ -4,7 +4,7 @@ use turtle_lib::*; #[turtle_main("Yin-Yang")] fn draw(turtle: &mut TurtlePlan) { - turtle.set_speed(900); + turtle.set_speed(200); turtle.circle_left(90.0, 180.0, 36); turtle.begin_fill();