// Generated by scripts/generate.mjs from bindings/api.mjs. Do not edit.

///|
#external
pub type ShapePath

///|
#module("@mizchi/three-mbt/constructors")
pub extern "js" fn ShapePath::ShapePath() -> ShapePath = "shapePath"

///|
pub extern "js" fn ShapePath::color(self : ShapePath) -> Color =
  #| (self) => self.color

///|
pub extern "js" fn ShapePath::user_data(self : ShapePath) -> UserData =
  #| (self) => self.userData

///|
pub extern "js" fn ShapePath::sub_paths(self : ShapePath) -> FixedArray[Path] =
  #| (self) => self.subPaths.slice()

///|
extern "js" fn ShapePath::ffi_current_path(self : ShapePath) -> Nullable[Path] =
  #| (self) => self.currentPath

///|
pub fn ShapePath::current_path(self : ShapePath) -> Path? {
  self.ffi_current_path().to_option()
}

///|
pub extern "js" fn ShapePath::move_to(
  self : ShapePath,
  x : Double,
  y : Double,
) -> ShapePath =
  #| (self, x, y) => self.moveTo(x, y)

///|
pub extern "js" fn ShapePath::line_to(
  self : ShapePath,
  x : Double,
  y : Double,
) -> ShapePath =
  #| (self, x, y) => self.lineTo(x, y)

///|
pub extern "js" fn ShapePath::quadratic_curve_to(
  self : ShapePath,
  cx : Double,
  cy : Double,
  x : Double,
  y : Double,
) -> ShapePath =
  #| (self, cx, cy, x, y) => self.quadraticCurveTo(cx, cy, x, y)

///|
pub extern "js" fn ShapePath::bezier_curve_to(
  self : ShapePath,
  cx1 : Double,
  cy1 : Double,
  cx2 : Double,
  cy2 : Double,
  x : Double,
  y : Double,
) -> ShapePath =
  #| (self, cx1, cy1, cx2, cy2, x, y) => self.bezierCurveTo(cx1, cy1, cx2, cy2, x, y)

///|
pub extern "js" fn ShapePath::spline_thru(
  self : ShapePath,
  points : FixedArray[Vector2],
) -> ShapePath =
  #| (self, points) => self.splineThru(points)

///|
pub extern "js" fn ShapePath::to_shapes(self : ShapePath) -> FixedArray[Shape] =
  #| (self) => self.toShapes()