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",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"lyon",
|
"lyon",
|
||||||
"lyon_path",
|
|
||||||
"mbtiles",
|
"mbtiles",
|
||||||
"ndk-glue",
|
"ndk-glue",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
|||||||
@ -82,11 +82,9 @@ cgmath = "0.18"
|
|||||||
# Rendering
|
# Rendering
|
||||||
wgpu = { version = "0.12" }
|
wgpu = { version = "0.12" }
|
||||||
lyon = { version = "0.17", features = [] }
|
lyon = { version = "0.17", features = [] }
|
||||||
lyon_path = "0.17"
|
|
||||||
|
|
||||||
# cached = "0.32"
|
# cached = "0.32"
|
||||||
|
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
||||||
|
|||||||
@ -4,11 +4,11 @@ use bytemuck::Pod;
|
|||||||
use lyon::geom::point;
|
use lyon::geom::point;
|
||||||
|
|
||||||
use lyon::lyon_tessellation::VertexBuffers;
|
use lyon::lyon_tessellation::VertexBuffers;
|
||||||
|
use lyon::path::{FillRule, Path};
|
||||||
use lyon::tessellation::geometry_builder::MaxIndex;
|
use lyon::tessellation::geometry_builder::MaxIndex;
|
||||||
use lyon::tessellation::{
|
use lyon::tessellation::{
|
||||||
BuffersBuilder, FillOptions, FillTessellator, StrokeOptions, StrokeTessellator,
|
BuffersBuilder, FillOptions, FillTessellator, StrokeOptions, StrokeTessellator,
|
||||||
};
|
};
|
||||||
use lyon_path::{FillRule, Path};
|
|
||||||
|
|
||||||
use crate::error::Error;
|
use crate::error::Error;
|
||||||
use vector_tile::geometry::{Command, Geometry};
|
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 {
|
for command in &polygon.commands {
|
||||||
match command {
|
match command {
|
||||||
Command::MoveTo(cmd) => {
|
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;
|
cursor += delta;
|
||||||
polygon_builder.begin(cursor);
|
polygon_builder.begin(cursor);
|
||||||
}
|
}
|
||||||
Command::LineTo(cmd) => {
|
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;
|
cursor += delta;
|
||||||
polygon_builder.line_to(cursor);
|
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);
|
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;
|
cursor += delta;
|
||||||
line_string_builder.begin(cursor);
|
line_string_builder.begin(cursor);
|
||||||
subpath_open = true;
|
subpath_open = true;
|
||||||
}
|
}
|
||||||
Command::LineTo(cmd) => {
|
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;
|
cursor += delta;
|
||||||
line_string_builder.line_to(cursor);
|
line_string_builder.line_to(cursor);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user