mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 15:28:04 +08:00
impl radius 1 and radius 2 for inner-radius and tightness,need to fix for turns
This commit is contained in:
@@ -83,13 +83,21 @@ fn spiral(
|
||||
#[default(25)] outer_radius: f64,
|
||||
#[default(5.)] turns: f64,
|
||||
#[default(90.)] angle_offset: f64,
|
||||
#[default(0.)] start_angle: f64,
|
||||
) -> VectorDataTable {
|
||||
let spiral_type = match spiral_type {
|
||||
SpiralType::Archimedean => bezier_rs::SpiralType::Archimedean,
|
||||
SpiralType::Logarithmic => bezier_rs::SpiralType::Logarithmic,
|
||||
};
|
||||
|
||||
VectorDataTable::new(VectorData::from_subpath(Subpath::new_spiral(inner_radius, outer_radius, turns, angle_offset.to_radians(), spiral_type)))
|
||||
VectorDataTable::new(VectorData::from_subpath(Subpath::new_spiral(
|
||||
inner_radius,
|
||||
outer_radius,
|
||||
turns,
|
||||
start_angle.to_radians(),
|
||||
angle_offset.to_radians(),
|
||||
spiral_type,
|
||||
)))
|
||||
}
|
||||
|
||||
#[node_macro::node(category("Vector: Shape"))]
|
||||
|
||||
Reference in New Issue
Block a user