initial svg support

This commit is contained in:
2025-10-23 09:40:08 +02:00
parent 88d188a794
commit 6e6aa8b27e
10 changed files with 309 additions and 10 deletions
+7 -2
View File
@@ -28,8 +28,10 @@ pub fn render_world(world: &TurtleWorld) {
for turtle in &world.turtles {
for cmd in &turtle.commands {
match cmd {
DrawCommand::Mesh { data } => {
DrawCommand::Mesh { data, source } => {
// Rendering wie bisher
draw_mesh(&data.to_mesh());
// Hier könnte man das source für Debug/Export loggen
}
DrawCommand::Text {
text,
@@ -37,8 +39,10 @@ pub fn render_world(world: &TurtleWorld) {
heading,
font_size,
color,
source,
} => {
draw_text_command(text, *position, *heading, *font_size, *color);
// Hier könnte man das source für Debug/Export loggen
}
}
}
@@ -76,7 +80,7 @@ pub fn render_world_with_tweens(world: &TurtleWorld, zoom_level: f32) {
for turtle in &world.turtles {
for cmd in &turtle.commands {
match cmd {
DrawCommand::Mesh { data } => {
DrawCommand::Mesh { data, source } => {
draw_mesh(&data.to_mesh());
}
DrawCommand::Text {
@@ -85,6 +89,7 @@ pub fn render_world_with_tweens(world: &TurtleWorld, zoom_level: f32) {
heading,
font_size,
color,
source,
} => {
draw_text_command(text, *position, *heading, *font_size, *color);
}