mod from_raw;
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;
#[cfg(test)]
mod test;
pub struct Spline();
impl Spline {
pub fn from_flatten_points(points: &[f64], tension: f64, num_of_segments: u32) -> Vec<f64> {
from_raw::get_curve_points(points, tension, num_of_segments)
}
}
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen]
pub fn getCurvePoints(pts: Vec<f64>, tension: f64, num_of_segments: u32) -> Vec<f64> {
let points = vec![10.0, 200.0, 256.0, 390.0, 512.0, 10.0, 778.0, 200.0];
Spline::points_from_raw(&pts, tension, num_of_segments)
}