#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUSamplerDescriptor)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `GpuSamplerDescriptor` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type GpuSamplerDescriptor;
#[wasm_bindgen(method, setter = "label")]
fn label_shim(this: &GpuSamplerDescriptor, val: &str);
#[cfg(feature = "GpuAddressMode")]
#[wasm_bindgen(method, setter = "addressModeU")]
fn address_mode_u_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode);
#[cfg(feature = "GpuAddressMode")]
#[wasm_bindgen(method, setter = "addressModeV")]
fn address_mode_v_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode);
#[cfg(feature = "GpuAddressMode")]
#[wasm_bindgen(method, setter = "addressModeW")]
fn address_mode_w_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode);
#[cfg(feature = "GpuCompareFunction")]
#[wasm_bindgen(method, setter = "compare")]
fn compare_shim(this: &GpuSamplerDescriptor, val: GpuCompareFunction);
#[wasm_bindgen(method, setter = "lodMaxClamp")]
fn lod_max_clamp_shim(this: &GpuSamplerDescriptor, val: f32);
#[wasm_bindgen(method, setter = "lodMinClamp")]
fn lod_min_clamp_shim(this: &GpuSamplerDescriptor, val: f32);
#[cfg(feature = "GpuFilterMode")]
#[wasm_bindgen(method, setter = "magFilter")]
fn mag_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode);
#[wasm_bindgen(method, setter = "maxAnisotropy")]
fn max_anisotropy_shim(this: &GpuSamplerDescriptor, val: u16);
#[cfg(feature = "GpuFilterMode")]
#[wasm_bindgen(method, setter = "minFilter")]
fn min_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode);
#[cfg(feature = "GpuMipmapFilterMode")]
#[wasm_bindgen(method, setter = "mipmapFilter")]
fn mipmap_filter_shim(this: &GpuSamplerDescriptor, val: GpuMipmapFilterMode);
}
#[cfg(web_sys_unstable_apis)]
impl GpuSamplerDescriptor {
#[doc = "Construct a new `GpuSamplerDescriptor`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `label` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn label(&mut self, val: &str) -> &mut Self {
self.label_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuAddressMode")]
#[doc = "Change the `addressModeU` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn address_mode_u(&mut self, val: GpuAddressMode) -> &mut Self {
self.address_mode_u_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuAddressMode")]
#[doc = "Change the `addressModeV` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn address_mode_v(&mut self, val: GpuAddressMode) -> &mut Self {
self.address_mode_v_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuAddressMode")]
#[doc = "Change the `addressModeW` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn address_mode_w(&mut self, val: GpuAddressMode) -> &mut Self {
self.address_mode_w_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuCompareFunction")]
#[doc = "Change the `compare` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self {
self.compare_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `lodMaxClamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn lod_max_clamp(&mut self, val: f32) -> &mut Self {
self.lod_max_clamp_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `lodMinClamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn lod_min_clamp(&mut self, val: f32) -> &mut Self {
self.lod_min_clamp_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuFilterMode")]
#[doc = "Change the `magFilter` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn mag_filter(&mut self, val: GpuFilterMode) -> &mut Self {
self.mag_filter_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `maxAnisotropy` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn max_anisotropy(&mut self, val: u16) -> &mut Self {
self.max_anisotropy_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuFilterMode")]
#[doc = "Change the `minFilter` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn min_filter(&mut self, val: GpuFilterMode) -> &mut Self {
self.min_filter_shim(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "GpuMipmapFilterMode")]
#[doc = "Change the `mipmapFilter` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `GpuMipmapFilterMode`, `GpuSamplerDescriptor`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn mipmap_filter(&mut self, val: GpuMipmapFilterMode) -> &mut Self {
self.mipmap_filter_shim(val);
self
}
}
#[cfg(web_sys_unstable_apis)]
impl Default for GpuSamplerDescriptor {
fn default() -> Self {
Self::new()
}
}