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

///|
#external
pub type MeshPhysicalMaterial

///|
#module("@mizchi/three-mbt/constructors")
extern "js" fn MeshPhysicalMaterial::ffi_create_MeshPhysicalMaterial(
  color : Int,
  roughness : Double,
  metalness : Double,
  flat_shading : Bool,
) -> MeshPhysicalMaterial = "meshPhysicalMaterial"

///|
pub fn MeshPhysicalMaterial::MeshPhysicalMaterial(
  color : Int,
  roughness? : Double = 1,
  metalness? : Double = 0,
  flat_shading? : Bool = false,
) -> MeshPhysicalMaterial {
  MeshPhysicalMaterial::ffi_create_MeshPhysicalMaterial(
    color, roughness, metalness, flat_shading,
  )
}

///|
pub fn MeshPhysicalMaterial::as_material(
  self : MeshPhysicalMaterial,
) -> Material = "%identity"

///|
pub fn MeshPhysicalMaterial::as_standard_material(
  self : MeshPhysicalMaterial,
) -> MeshStandardMaterial = "%identity"

///|
pub extern "js" fn MeshPhysicalMaterial::clearcoat(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.clearcoat

///|
pub extern "js" fn MeshPhysicalMaterial::set_clearcoat(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.clearcoat = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::transmission(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.transmission

///|
pub extern "js" fn MeshPhysicalMaterial::set_transmission(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.transmission = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::thickness(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.thickness

///|
pub extern "js" fn MeshPhysicalMaterial::set_thickness(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.thickness = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::ior(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.ior

///|
pub extern "js" fn MeshPhysicalMaterial::set_ior(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.ior = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::reflectivity(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.reflectivity

///|
pub extern "js" fn MeshPhysicalMaterial::set_reflectivity(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.reflectivity = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::iridescence(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.iridescence

///|
pub extern "js" fn MeshPhysicalMaterial::set_iridescence(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.iridescence = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::sheen(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.sheen

///|
pub extern "js" fn MeshPhysicalMaterial::set_sheen(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.sheen = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::anisotropy(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.anisotropy

///|
pub extern "js" fn MeshPhysicalMaterial::set_anisotropy(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.anisotropy = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::dispersion(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.dispersion

///|
pub extern "js" fn MeshPhysicalMaterial::set_dispersion(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.dispersion = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::clearcoat_roughness(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.clearcoatRoughness

///|
pub extern "js" fn MeshPhysicalMaterial::set_clearcoat_roughness(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.clearcoatRoughness = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::attenuation_distance(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.attenuationDistance

///|
pub extern "js" fn MeshPhysicalMaterial::set_attenuation_distance(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.attenuationDistance = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::sheen_roughness(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.sheenRoughness

///|
pub extern "js" fn MeshPhysicalMaterial::set_sheen_roughness(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.sheenRoughness = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::specular_intensity(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.specularIntensity

///|
pub extern "js" fn MeshPhysicalMaterial::set_specular_intensity(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.specularIntensity = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::anisotropy_rotation(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.anisotropyRotation

///|
pub extern "js" fn MeshPhysicalMaterial::set_anisotropy_rotation(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.anisotropyRotation = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::iridescence_ior(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.iridescenceIOR

///|
pub extern "js" fn MeshPhysicalMaterial::set_iridescence_ior(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.iridescenceIOR = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::attenuation_color(
  self : MeshPhysicalMaterial,
) -> Color =
  #| (self) => self.attenuationColor

///|
pub extern "js" fn MeshPhysicalMaterial::sheen_color(
  self : MeshPhysicalMaterial,
) -> Color =
  #| (self) => self.sheenColor

///|
pub extern "js" fn MeshPhysicalMaterial::specular_color(
  self : MeshPhysicalMaterial,
) -> Color =
  #| (self) => self.specularColor

///|
pub extern "js" fn MeshPhysicalMaterial::clearcoat_normal_scale(
  self : MeshPhysicalMaterial,
) -> Vector2 =
  #| (self) => self.clearcoatNormalScale

///|
pub extern "js" fn MeshPhysicalMaterial::iridescence_thickness_range(
  self : MeshPhysicalMaterial,
) -> FixedArray[Double] =
  #| (self) => self.iridescenceThicknessRange.slice()

///|
pub extern "js" fn MeshPhysicalMaterial::set_iridescence_thickness_range(
  self : MeshPhysicalMaterial,
  minimum : Double,
  maximum : Double,
) -> Unit =
  #| (self, minimum, maximum) => { self.iridescenceThicknessRange = [minimum, maximum]; }

///|
extern "js" fn MeshPhysicalMaterial::ffi_clearcoat_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.clearcoatMap

///|
pub fn MeshPhysicalMaterial::clearcoat_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_clearcoat_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_clearcoat_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.clearcoatMap = value; }

///|
pub fn MeshPhysicalMaterial::set_clearcoat_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_clearcoat_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_clearcoat_roughness_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.clearcoatRoughnessMap

///|
pub fn MeshPhysicalMaterial::clearcoat_roughness_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_clearcoat_roughness_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_clearcoat_roughness_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.clearcoatRoughnessMap = value; }

///|
pub fn MeshPhysicalMaterial::set_clearcoat_roughness_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_clearcoat_roughness_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_clearcoat_normal_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.clearcoatNormalMap

///|
pub fn MeshPhysicalMaterial::clearcoat_normal_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_clearcoat_normal_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_clearcoat_normal_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.clearcoatNormalMap = value; }

///|
pub fn MeshPhysicalMaterial::set_clearcoat_normal_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_clearcoat_normal_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_transmission_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.transmissionMap

///|
pub fn MeshPhysicalMaterial::transmission_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_transmission_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_transmission_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.transmissionMap = value; }

///|
pub fn MeshPhysicalMaterial::set_transmission_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_transmission_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_thickness_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.thicknessMap

///|
pub fn MeshPhysicalMaterial::thickness_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_thickness_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_thickness_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.thicknessMap = value; }

///|
pub fn MeshPhysicalMaterial::set_thickness_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_thickness_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_iridescence_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.iridescenceMap

///|
pub fn MeshPhysicalMaterial::iridescence_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_iridescence_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_iridescence_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.iridescenceMap = value; }

///|
pub fn MeshPhysicalMaterial::set_iridescence_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_iridescence_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_iridescence_thickness_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.iridescenceThicknessMap

///|
pub fn MeshPhysicalMaterial::iridescence_thickness_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_iridescence_thickness_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_iridescence_thickness_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.iridescenceThicknessMap = value; }

///|
pub fn MeshPhysicalMaterial::set_iridescence_thickness_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_iridescence_thickness_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_sheen_color_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.sheenColorMap

///|
pub fn MeshPhysicalMaterial::sheen_color_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_sheen_color_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_sheen_color_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.sheenColorMap = value; }

///|
pub fn MeshPhysicalMaterial::set_sheen_color_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_sheen_color_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_sheen_roughness_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.sheenRoughnessMap

///|
pub fn MeshPhysicalMaterial::sheen_roughness_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_sheen_roughness_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_sheen_roughness_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.sheenRoughnessMap = value; }

///|
pub fn MeshPhysicalMaterial::set_sheen_roughness_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_sheen_roughness_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_specular_color_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.specularColorMap

///|
pub fn MeshPhysicalMaterial::specular_color_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_specular_color_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_specular_color_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.specularColorMap = value; }

///|
pub fn MeshPhysicalMaterial::set_specular_color_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_specular_color_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_specular_intensity_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.specularIntensityMap

///|
pub fn MeshPhysicalMaterial::specular_intensity_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_specular_intensity_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_specular_intensity_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.specularIntensityMap = value; }

///|
pub fn MeshPhysicalMaterial::set_specular_intensity_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_specular_intensity_map(Nullable::from_option(value))
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_anisotropy_map(
  self : MeshPhysicalMaterial,
) -> Nullable[Texture] =
  #| (self) => self.anisotropyMap

///|
pub fn MeshPhysicalMaterial::anisotropy_map(
  self : MeshPhysicalMaterial,
) -> Texture? {
  self.ffi_anisotropy_map().to_option()
}

///|
extern "js" fn MeshPhysicalMaterial::ffi_set_anisotropy_map(
  self : MeshPhysicalMaterial,
  value : Nullable[Texture],
) -> Unit =
  #| (self, value) => { self.anisotropyMap = value; }

///|
pub fn MeshPhysicalMaterial::set_anisotropy_map(
  self : MeshPhysicalMaterial,
  value : Texture?,
) -> Unit {
  self.ffi_set_anisotropy_map(Nullable::from_option(value))
}

///|
pub extern "js" fn MeshPhysicalMaterial::id(self : MeshPhysicalMaterial) -> Int =
  #| (self) => self.id

///|
pub extern "js" fn MeshPhysicalMaterial::kind(
  self : MeshPhysicalMaterial,
) -> String =
  #| (self) => self.type

///|
pub extern "js" fn MeshPhysicalMaterial::name(
  self : MeshPhysicalMaterial,
) -> String =
  #| (self) => self.name

///|
pub extern "js" fn MeshPhysicalMaterial::set_name(
  self : MeshPhysicalMaterial,
  value : String,
) -> Unit =
  #| (self, value) => { self.name = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::opacity(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.opacity

///|
pub extern "js" fn MeshPhysicalMaterial::set_opacity(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.opacity = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::transparent(
  self : MeshPhysicalMaterial,
) -> Bool =
  #| (self) => self.transparent

///|
pub extern "js" fn MeshPhysicalMaterial::set_transparent(
  self : MeshPhysicalMaterial,
  value : Bool,
) -> Unit =
  #| (self, value) => { self.transparent = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::visible(
  self : MeshPhysicalMaterial,
) -> Bool =
  #| (self) => self.visible

///|
pub extern "js" fn MeshPhysicalMaterial::set_visible(
  self : MeshPhysicalMaterial,
  value : Bool,
) -> Unit =
  #| (self, value) => { self.visible = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::depth_test(
  self : MeshPhysicalMaterial,
) -> Bool =
  #| (self) => self.depthTest

///|
pub extern "js" fn MeshPhysicalMaterial::set_depth_test(
  self : MeshPhysicalMaterial,
  value : Bool,
) -> Unit =
  #| (self, value) => { self.depthTest = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::depth_write(
  self : MeshPhysicalMaterial,
) -> Bool =
  #| (self) => self.depthWrite

///|
pub extern "js" fn MeshPhysicalMaterial::set_depth_write(
  self : MeshPhysicalMaterial,
  value : Bool,
) -> Unit =
  #| (self, value) => { self.depthWrite = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::dispose(
  self : MeshPhysicalMaterial,
) -> Unit =
  #| (self) => self.dispose()

///|
pub extern "js" fn MeshPhysicalMaterial::mark_needs_update(
  self : MeshPhysicalMaterial,
) -> Unit =
  #| (self) => { self.needsUpdate = true; }

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

///|
pub extern "js" fn MeshPhysicalMaterial::roughness(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.roughness

///|
pub extern "js" fn MeshPhysicalMaterial::set_roughness(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.roughness = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::metalness(
  self : MeshPhysicalMaterial,
) -> Double =
  #| (self) => self.metalness

///|
pub extern "js" fn MeshPhysicalMaterial::set_metalness(
  self : MeshPhysicalMaterial,
  value : Double,
) -> Unit =
  #| (self, value) => { self.metalness = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::wireframe(
  self : MeshPhysicalMaterial,
) -> Bool =
  #| (self) => self.wireframe

///|
pub extern "js" fn MeshPhysicalMaterial::set_wireframe(
  self : MeshPhysicalMaterial,
  value : Bool,
) -> Unit =
  #| (self, value) => { self.wireframe = value; }

///|
pub extern "js" fn MeshPhysicalMaterial::flat_shading(
  self : MeshPhysicalMaterial,
) -> Bool =
  #| (self) => self.flatShading

///|
pub extern "js" fn MeshPhysicalMaterial::set_flat_shading(
  self : MeshPhysicalMaterial,
  value : Bool,
) -> Unit =
  #| (self, value) => { self.flatShading = value; }