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

///|
#external
pub type Intersection

///|
pub extern "js" fn Intersection::distance(self : Intersection) -> Double =
  #| (self) => self.distance

///|
pub extern "js" fn Intersection::point(self : Intersection) -> Vector3 =
  #| (self) => self.point

///|
pub extern "js" fn Intersection::object(self : Intersection) -> Object3D =
  #| (self) => self.object

///|
extern "js" fn Intersection::ffi_uv(self : Intersection) -> Nullable[Vector2] =
  #| (self) => self.uv

///|
pub fn Intersection::uv(self : Intersection) -> Vector2? {
  self.ffi_uv().to_option()
}

///|
extern "js" fn Intersection::ffi_face_index(
  self : Intersection,
) -> Nullable[Int] =
  #| (self) => self.faceIndex

///|
pub fn Intersection::face_index(self : Intersection) -> Int? {
  self.ffi_face_index().to_option()
}

///|
extern "js" fn Intersection::ffi_instance_id(
  self : Intersection,
) -> Nullable[Int] =
  #| (self) => self.instanceId

///|
pub fn Intersection::instance_id(self : Intersection) -> Int? {
  self.ffi_instance_id().to_option()
}

///|
extern "js" fn Intersection::ffi_batch_id(
  self : Intersection,
) -> Nullable[BatchedInstanceId] =
  #| (self) => self.batchId

///|
pub fn Intersection::batch_id(self : Intersection) -> BatchedInstanceId? {
  self.ffi_batch_id().to_option()
}

///|
extern "js" fn Intersection::ffi_face(self : Intersection) -> Nullable[Face] =
  #| (self) => self.face

///|
pub fn Intersection::face(self : Intersection) -> Face? {
  self.ffi_face().to_option()
}

///|
extern "js" fn Intersection::ffi_barycoord(
  self : Intersection,
) -> Nullable[Vector3] =
  #| (self) => self.barycoord

///|
pub fn Intersection::barycoord(self : Intersection) -> Vector3? {
  self.ffi_barycoord().to_option()
}

///|
extern "js" fn Intersection::ffi_normal(
  self : Intersection,
) -> Nullable[Vector3] =
  #| (self) => self.normal

///|
pub fn Intersection::normal(self : Intersection) -> Vector3? {
  self.ffi_normal().to_option()
}

///|
extern "js" fn Intersection::ffi_uv1(self : Intersection) -> Nullable[Vector2] =
  #| (self) => self.uv1

///|
pub fn Intersection::uv1(self : Intersection) -> Vector2? {
  self.ffi_uv1().to_option()
}

///|
extern "js" fn Intersection::ffi_index(self : Intersection) -> Nullable[Int] =
  #| (self) => self.index

///|
pub fn Intersection::index(self : Intersection) -> Int? {
  self.ffi_index().to_option()
}

///|
extern "js" fn Intersection::ffi_distance_to_ray(
  self : Intersection,
) -> Nullable[Double] =
  #| (self) => self.distanceToRay

///|
pub fn Intersection::distance_to_ray(self : Intersection) -> Double? {
  self.ffi_distance_to_ray().to_option()
}

///|
extern "js" fn Intersection::ffi_point_on_line(
  self : Intersection,
) -> Nullable[Vector3] =
  #| (self) => self.pointOnLine

///|
pub fn Intersection::point_on_line(self : Intersection) -> Vector3? {
  self.ffi_point_on_line().to_option()
}