feat: instance node
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m44s

This commit is contained in:
2024-05-06 01:10:23 +02:00
parent a01a409b97
commit 10a12ad41c
20 changed files with 695 additions and 147 deletions

View File

@@ -31,6 +31,7 @@ impl PathDataMut<'_> {
}
}
#[derive(Debug)]
pub struct PathData<'a> {
pub depth: i32,
pub length: usize,
@@ -55,6 +56,15 @@ impl PathData<'_> {
}
l
}
pub fn get_point_at(&self, alpha: f32) -> [f32; 4] {
get_point_at_path(self.points, alpha)
}
pub fn get_direction_at(&self, alpha: f32) -> [f32; 3] {
get_direction_at_path(self.points, alpha)
}
pub fn interpolate_along(&self, alpha: f32) -> (Vec4, Vec3, Vec3) {
interpolate_along_path(self.points, alpha)
}
}
pub fn create_multiple_paths(amount: usize, point_amount: usize, depth: i32) -> Vec<i32> {