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

///|
#external
pub type Data3DTexture

///|
#module("@mizchi/three-mbt/constructors")
pub extern "js" fn Data3DTexture::Data3DTexture(
  bytes : Bytes,
  width : Int,
  height : Int,
  depth : Int,
) -> Data3DTexture = "data3DTexture"

///|
pub fn Data3DTexture::as_texture(self : Data3DTexture) -> Texture = "%identity"

///|
pub extern "js" fn Data3DTexture::width(self : Data3DTexture) -> Int =
  #| (self) => self.image.width

///|
pub extern "js" fn Data3DTexture::height(self : Data3DTexture) -> Int =
  #| (self) => self.image.height

///|
pub extern "js" fn Data3DTexture::depth(self : Data3DTexture) -> Int =
  #| (self) => self.image.depth

///|
pub extern "js" fn Data3DTexture::wrap_r(self : Data3DTexture) -> Wrapping =
  #| (self) => self.wrapR

///|
pub extern "js" fn Data3DTexture::set_wrap_r(
  self : Data3DTexture,
  value : Wrapping,
) -> Unit =
  #| (self, value) => { self.wrapR = value; }

///|
pub extern "js" fn Data3DTexture::bytes(self : Data3DTexture) -> Bytes =
  #| (self) => self.image.data.slice()

///|
pub extern "js" fn Data3DTexture::set_bytes(
  self : Data3DTexture,
  bytes : Bytes,
) -> Unit =
  #| (self, bytes) => { self.image.data = bytes; self.needsUpdate = true; }