initial svg support
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user