Update dependencies and lock files (#1841)

* Bump lock files

* Fix glam mismatch version

* Add tokio feature

* Update all deps

* Fix gpu-compiler not able to reference the root workspace

* Bump a few more deps

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
James Lindsay 2024-07-22 10:56:29 +01:00 committed by GitHub
parent ab71d26d84
commit fa1535d0bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 7466 additions and 8962 deletions

View file

@ -51,7 +51,7 @@ impl Quad {
let offset = |index_before, index, index_after| {
let [point_before, point, point_after]: [DVec2; 3] = [self.0[index_before], self.0[index], self.0[index_after]];
let [line_in, line_out] = [point - point_before, point_after - point];
let angle = line_in.angle_between(-line_out);
let angle = line_in.angle_to(-line_out);
let offset_length = offset / (std::f64::consts::FRAC_PI_2 - angle / 2.).cos();
point + (line_in.perp().normalize_or_zero() + line_out.perp().normalize_or_zero()).normalize_or_zero() * offset_length
};

View file

@ -203,7 +203,7 @@ fn construct_vector2(_primary: (), x: f64, y: f64) -> glam::DVec2 {
// Size Of
#[cfg(feature = "std")]
struct SizeOfNode;
pub struct SizeOfNode;
#[cfg(feature = "std")]
#[node_macro::node_fn(SizeOfNode)]
fn flat_map(ty: crate::Type) -> Option<usize> {

View file

@ -81,7 +81,7 @@ impl<T: Linear + Debug + Copy> LinearChannel for T {}
use num_derive::*;
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Num, NumCast, NumOps, One, Zero, ToPrimitive, FromPrimitive)]
struct SRGBGammaFloat(f32);
pub struct SRGBGammaFloat(f32);
impl Channel for SRGBGammaFloat {
#[inline(always)]

View file

@ -178,7 +178,7 @@ impl Gradient {
let (start, end) = (transform.transform_point2(self.start), transform.transform_point2(self.end));
// Calculate the new position by finding the closest point on the line
let new_position = ((end - start).angle_between(mouse - start)).cos() * start.distance(mouse) / start.distance(end);
let new_position = ((end - start).angle_to(mouse - start)).cos() * start.distance(mouse) / start.distance(end);
// Don't insert point past end of line
if !(0. ..=1.).contains(&new_position) {

View file

@ -638,7 +638,7 @@ mod test {
for (index, (_, subpath)) in repeated.region_bezier_paths().enumerate() {
let expected_angle = (index as f64 + 1.) * 45.;
let center = (subpath.manipulator_groups()[0].anchor + subpath.manipulator_groups()[2].anchor) / 2.;
let actual_angle = DVec2::Y.angle_between(center).to_degrees();
let actual_angle = DVec2::Y.angle_to(center).to_degrees();
assert!((actual_angle - expected_angle).abs() % 360. < 1e-5);
}
}

File diff suppressed because it is too large Load diff

View file

@ -9,25 +9,28 @@ default = []
profiling = ["nvtx"]
serde = ["graphene-core/serde", "glam/serde"]
# NOTE: We can't use workspace dependencies in this crate because it uses a different toolchain
[dependencies]
# Local dependencies
graph-craft = { path = "../graph-craft", features = ["serde"] }
gpu-executor = { path = "../gpu-executor" }
# Workspace dependencies
graphene-core = { workspace = true, features = ["async", "std", "alloc"] }
dyn-any = { workspace = true, features = ["log-bad-types", "rc", "glam"] }
num-traits = { workspace = true }
log = { workspace = true }
serde = { workspace = true }
glam = { workspace = true }
base64 = { workspace = true }
bytemuck = { workspace = true }
tempfile = { workspace = true }
anyhow = { workspace = true }
serde_json = { workspace = true }
graphene-core = { path = "../gcore", features = ["std", "alloc"] }
dyn-any = { path = "../../libraries/dyn-any", features = [
"log-bad-types",
"rc",
"glam",
] }
# Required dependencies
num-traits = { version = "0.2", default-features = false, features = ["i128"] }
log = "0.4"
serde = { version = "1.0", features = ["derive", "rc"] }
glam = { version = "0.28", default-features = false, features = ["serde"] }
base64 = "0.22"
bytemuck = { version = "1.13", features = ["derive"] }
tempfile = "3.6"
anyhow = "1.0"
serde_json = "1.0"
tera = { version = "1.17.1" }
spirv-builder = { version = "0.9", default-features = false, features = [
"use-installed-tools",

View file

@ -9,6 +9,7 @@ default = ["dealloc_nodes"]
serde = ["dep:serde", "graphene-core/serde", "glam/serde", "bezier-rs/serde"]
dealloc_nodes = []
wgpu = []
tokio = ["dep:tokio"]
[dependencies]
# Local dependencies
@ -35,6 +36,7 @@ wgpu-executor = { workspace = true }
# Optional workspace dependencies
serde = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
# Workspace dependencies

View file

@ -225,8 +225,7 @@ fn to_svg_string(vector: &VectorData, transform: DAffine2) -> String {
fn from_svg_string(svg_string: &str) -> VectorData {
let svg = format!(r#"<svg xmlns="http://www.w3.org/2000/svg"><path d="{}"></path></svg>"#, svg_string);
let fontdb = usvg::fontdb::Database::new();
let Some(tree) = usvg::Tree::from_str(&svg, &Default::default(), &fontdb).ok() else {
let Some(tree) = usvg::Tree::from_str(&svg, &Default::default()).ok() else {
return VectorData::empty();
};
let Some(usvg::Node::Path(path)) = tree.root().children().first() else {