The API Documentation below will help you learn about the various things you can do with this crate.
If this is your first time using Rust or using this crate, read the Guide on turtle.rs to learn how to start.
The documentation for the
Turtle struct contains a listing of all of the
various drawing commands that you can use on the Turtles that you create. The
module and its submodules contain hundreds of predefined color names that you
can use to set the pen, background and fill color of a turtle. That module also explains how to
use any arbitrary color, including ones that may not be defined in this crate.
turtle::start() if you do not create a turtle with
Turtle::new() right at the beginning of your program. Most
programs will never need to call this function as it is called for you in
rand module for information about generating random colors, speeds,
angles, and more which can be used in your programs to produce some interesting results!
Event enum documentation provides information about how you can
create an event loop. This allows you to draw things in response to certain events like the
mouse moving, keys being pressed, and more.
Turtle struct contains a few convenience methods so you can do some common event-related
things without creating the entire event loop. For example, use
wait_for_click() to wait for the user to click
anywhere on the screen before proceeding.
Color types and constants
Event handling (mouse, keyboard, controller, touch screen, etc.)
Utilities for generating random values
A turtle with a pen attached to its tail
Represents the supported movement and rotation speeds
Generates a random value using the thread-local random number generator.
Start the turtle window in advance
An angle value without a unit
Any distance value (positive or negative)
A point in 2D space: [x, y]