Simplify dependencies

This commit is contained in:
Maximilian Ammann 2022-03-27 16:05:34 +02:00
parent 38db846a7e
commit d63b347b99
3 changed files with 5 additions and 8 deletions

1
Cargo.lock generated
View File

@ -1663,7 +1663,6 @@ dependencies = [
"js-sys",
"log",
"lyon",
"lyon_path",
"mbtiles",
"ndk-glue",
"reqwest",

View File

@ -82,11 +82,9 @@ cgmath = "0.18"
# Rendering
wgpu = { version = "0.12" }
lyon = { version = "0.17", features = [] }
lyon_path = "0.17"
# cached = "0.32"
# Logging
log = "0.4"

View File

@ -4,11 +4,11 @@ use bytemuck::Pod;
use lyon::geom::point;
use lyon::lyon_tessellation::VertexBuffers;
use lyon::path::{FillRule, Path};
use lyon::tessellation::geometry_builder::MaxIndex;
use lyon::tessellation::{
BuffersBuilder, FillOptions, FillTessellator, StrokeOptions, StrokeTessellator,
};
use lyon_path::{FillRule, Path};
use crate::error::Error;
use vector_tile::geometry::{Command, Geometry};
@ -31,12 +31,12 @@ impl<I: Add + From<lyon::lyon_tessellation::VertexId> + MaxIndex + Pod> Tessella
for command in &polygon.commands {
match command {
Command::MoveTo(cmd) => {
let delta = lyon_path::math::vector(cmd.x as f32, cmd.y as f32);
let delta = lyon::path::math::vector(cmd.x as f32, cmd.y as f32);
cursor += delta;
polygon_builder.begin(cursor);
}
Command::LineTo(cmd) => {
let delta = lyon_path::math::vector(cmd.x as f32, cmd.y as f32);
let delta = lyon::path::math::vector(cmd.x as f32, cmd.y as f32);
cursor += delta;
polygon_builder.line_to(cursor);
}
@ -65,13 +65,13 @@ impl<I: Add + From<lyon::lyon_tessellation::VertexId> + MaxIndex + Pod> Tessella
line_string_builder.end(false);
}
let delta = lyon_path::math::vector(cmd.x as f32, cmd.y as f32);
let delta = lyon::path::math::vector(cmd.x as f32, cmd.y as f32);
cursor += delta;
line_string_builder.begin(cursor);
subpath_open = true;
}
Command::LineTo(cmd) => {
let delta = lyon_path::math::vector(cmd.x as f32, cmd.y as f32);
let delta = lyon::path::math::vector(cmd.x as f32, cmd.y as f32);
cursor += delta;
line_string_builder.line_to(cursor);
}