Work on sampler nodes, fix slew limiter

This commit is contained in:
Skyler Lehmkuhl
2026-02-16 18:45:11 -05:00
parent 93a29192fd
commit 2c0d53fb84
8 changed files with 557 additions and 33 deletions
@@ -332,7 +332,9 @@ where
ports: &SlotMap<Key, Value>,
port_locations: &PortLocations,
cursor_pos: Pos2,
zoom: f32,
) -> Pos2 {
let snap_distance = DISTANCE_TO_CONNECT * zoom;
ports
.iter()
.find_map(|(port_id, _)| {
@@ -352,7 +354,7 @@ where
.unwrap()
})
.filter(|nearest_hook| {
nearest_hook.distance(cursor_pos) < DISTANCE_TO_CONNECT
nearest_hook.distance(cursor_pos) < snap_distance
})
.copied()
})
@@ -372,6 +374,7 @@ where
&self.graph.inputs,
&port_locations,
cursor_pos,
self.pan_zoom.zoom,
),
),
AnyParameterId::Input(_) => (
@@ -381,6 +384,7 @@ where
&self.graph.outputs,
&port_locations,
cursor_pos,
self.pan_zoom.zoom,
),
start_pos,
),