mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Simplify dependencies
This commit is contained in:
parent
38db846a7e
commit
d63b347b99
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -1663,7 +1663,6 @@ dependencies = [
|
||||
"js-sys",
|
||||
"log",
|
||||
"lyon",
|
||||
"lyon_path",
|
||||
"mbtiles",
|
||||
"ndk-glue",
|
||||
"reqwest",
|
||||
|
||||
@ -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"
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user