// Generated by scripts/generate.mjs from bindings/api.mjs. Do not edit.
///|
#external
pub type DataArrayTexture
///|
#module("@mizchi/three-mbt/constructors")
pub extern "js" fn DataArrayTexture::DataArrayTexture(
bytes : Bytes,
width : Int,
height : Int,
depth : Int,
) -> DataArrayTexture = "dataArrayTexture"
///|
pub fn DataArrayTexture::as_texture(self : DataArrayTexture) -> Texture = "%identity"
///|
pub extern "js" fn DataArrayTexture::width(self : DataArrayTexture) -> Int =
#| (self) => self.image.width
///|
pub extern "js" fn DataArrayTexture::height(self : DataArrayTexture) -> Int =
#| (self) => self.image.height
///|
pub extern "js" fn DataArrayTexture::depth(self : DataArrayTexture) -> Int =
#| (self) => self.image.depth
///|
pub extern "js" fn DataArrayTexture::wrap_r(
self : DataArrayTexture,
) -> Wrapping =
#| (self) => self.wrapR
///|
pub extern "js" fn DataArrayTexture::set_wrap_r(
self : DataArrayTexture,
value : Wrapping,
) -> Unit =
#| (self, value) => { self.wrapR = value; }
///|
pub extern "js" fn DataArrayTexture::bytes(self : DataArrayTexture) -> Bytes =
#| (self) => self.image.data.slice()
///|
pub extern "js" fn DataArrayTexture::set_bytes(
self : DataArrayTexture,
bytes : Bytes,
) -> Unit =
#| (self, bytes) => { self.image.data = bytes; self.needsUpdate = true; }
///|
pub extern "js" fn DataArrayTexture::add_layer_update(
self : DataArrayTexture,
layer : Int,
) -> Unit =
#| (self, layer) => self.addLayerUpdate(layer)
///|
pub extern "js" fn DataArrayTexture::clear_layer_updates(
self : DataArrayTexture,
) -> Unit =
#| (self) => self.clearLayerUpdates()
///|
pub extern "js" fn DataArrayTexture::layer_updates(
self : DataArrayTexture,
) -> FixedArray[Int] =
#| (self) => Array.from(self.layerUpdates)