// Generated by scripts/generate.mjs from bindings/api.mjs. Do not edit.
///|
#external
pub type SplineCurve
///|
#module("@mizchi/three-mbt/constructors")
pub extern "js" fn SplineCurve::SplineCurve(
points : FixedArray[Vector2],
) -> SplineCurve = "splineCurve"
///|
pub fn SplineCurve::as_curve2(self : SplineCurve) -> Curve2 = "%identity"
///|
pub extern "js" fn SplineCurve::points(
self : SplineCurve,
) -> FixedArray[Vector2] =
#| (self) => self.points.slice()
///|
pub extern "js" fn SplineCurve::set_points(
self : SplineCurve,
points : FixedArray[Vector2],
) -> Unit =
#| (self, points) => { self.points = points.slice(); self.updateArcLengths(); }
///|
extern "js" fn SplineCurve::ffi_get_point(
self : SplineCurve,
t : Double,
target : Vector2,
) -> Vector2 =
#| (self, t, target) => self.getPoint(t, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn SplineCurve::get_point(
self : SplineCurve,
t : Double,
target? : Vector2 = Vector2(0, 0),
) -> Vector2 {
self.ffi_get_point(t, target)
}
///|
extern "js" fn SplineCurve::ffi_get_point_at(
self : SplineCurve,
u : Double,
target : Vector2,
) -> Vector2 =
#| (self, u, target) => self.getPointAt(u, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn SplineCurve::get_point_at(
self : SplineCurve,
u : Double,
target? : Vector2 = Vector2(0, 0),
) -> Vector2 {
self.ffi_get_point_at(u, target)
}
///|
extern "js" fn SplineCurve::ffi_get_tangent(
self : SplineCurve,
t : Double,
target : Vector2,
) -> Vector2 =
#| (self, t, target) => self.getTangent(t, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn SplineCurve::get_tangent(
self : SplineCurve,
t : Double,
target? : Vector2 = Vector2(0, 0),
) -> Vector2 {
self.ffi_get_tangent(t, target)
}
///|
extern "js" fn SplineCurve::ffi_get_tangent_at(
self : SplineCurve,
u : Double,
target : Vector2,
) -> Vector2 =
#| (self, u, target) => self.getTangentAt(u, target)
///|
/// Passes target to the native method and preserves its return value. An omitted target is allocated per call.
pub fn SplineCurve::get_tangent_at(
self : SplineCurve,
u : Double,
target? : Vector2 = Vector2(0, 0),
) -> Vector2 {
self.ffi_get_tangent_at(u, target)
}
///|
pub extern "js" fn SplineCurve::get_points(
self : SplineCurve,
divisions : Int,
) -> FixedArray[Vector2] =
#| (self, divisions) => self.getPoints(divisions)
///|
pub extern "js" fn SplineCurve::get_spaced_points(
self : SplineCurve,
divisions : Int,
) -> FixedArray[Vector2] =
#| (self, divisions) => self.getSpacedPoints(divisions)
///|
pub extern "js" fn SplineCurve::get_length(self : SplineCurve) -> Double =
#| (self) => self.getLength()
///|
pub extern "js" fn SplineCurve::update_arc_lengths(self : SplineCurve) -> Unit =
#| (self) => self.updateArcLengths()