Add --export-svg CLI parameter support to turtle_main macro
Co-authored-by: enaut <290005+enaut@users.noreply.github.com>
This commit is contained in:
co-authored by
enaut
parent
2b64be29a8
commit
d85a9c7d26
@@ -367,6 +367,23 @@ impl TurtleApp {
|
||||
.all(|turtle| turtle.tween_controller.is_complete())
|
||||
}
|
||||
|
||||
/// Check if all animations are complete (alias for is_complete)
|
||||
#[must_use]
|
||||
pub fn all_animations_complete(&self) -> bool {
|
||||
self.is_complete()
|
||||
}
|
||||
|
||||
/// Set the animation speed for all turtles
|
||||
///
|
||||
/// # Arguments
|
||||
/// * `speed` - The animation speed to set for all turtles
|
||||
pub fn set_all_turtles_speed(&mut self, speed: AnimationSpeed) {
|
||||
for turtle in &mut self.world.turtles {
|
||||
turtle.set_speed(speed);
|
||||
turtle.tween_controller.set_speed(speed);
|
||||
}
|
||||
}
|
||||
|
||||
/// Get reference to the world state
|
||||
#[must_use]
|
||||
pub fn world(&self) -> &TurtleWorld {
|
||||
|
||||
Reference in New Issue
Block a user