New nodes: 'Sign', 'Distance', 'Cross Product', and 'Lerp' (#4361)

This commit is contained in:
Keavon Chambers
2026-07-22 22:03:50 -07:00
committed by GitHub
parent 2f65a3aee2
commit 515a5265fe
4 changed files with 225 additions and 39 deletions

View File

@@ -6,7 +6,7 @@ use glam::{DVec2, IVec2, UVec2};
/// Obtains the X or Y component of a vec2.
///
/// The inverse of this node is **Combine Vec2**, which composes a vec2 from its X and Y components.
#[node_macro::node(name("Extract XY"), category("Math: Vector"))]
#[node_macro::node(name("Extract XY"), category("Math: Vec2"))]
fn extract_xy<T: Into<DVec2>>(_: impl Ctx, #[implementations(DVec2, IVec2, UVec2)] vector: Item<T>, axis: Item<XY>) -> Item<f64> {
let vector = vector.into_element();
let axis = axis.into_element();