euv-core 0.53.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Sampler filtering and addressing configuration matching a glTF 2.0 sampler object.
#[derive(Clone, Copy, Data, Debug, Default, Eq, Hash, New, PartialEq)]
pub struct TextureSampler3D {
    /// Magnification filter applied when texels cover multiple pixels.
    #[get(type(copy))]
    pub(crate) mag_filter: TextureFilterMode,
    /// Minification filter applied when multiple texels project into one pixel.
    #[get(type(copy))]
    pub(crate) min_filter: TextureFilterMode,
    /// Horizontal (`U` / `S`) coordinate wrap mode.
    #[get(type(copy))]
    pub(crate) wrap_s: TextureWrapMode,
    /// Vertical (`V` / `T`) coordinate wrap mode.
    #[get(type(copy))]
    pub(crate) wrap_t: TextureWrapMode,
}

/// Single mipmap level storing packed RGBA8 texels.
#[derive(Clone, Data, Debug, Default, Eq, PartialEq)]
pub struct TextureMipLevel3D {
    /// Mip level width in texels.
    #[get(type(copy))]
    pub(crate) width: u32,
    /// Mip level height in texels.
    #[get(type(copy))]
    pub(crate) height: u32,
    /// Packed RGBA8 texels (`width * height * 4` bytes).
    pub(crate) pixels: Vec<u8>,
}

/// Mipmapped 3D texture asset decoded from embedded or external Blender/glTF images.
#[derive(Clone, Data, Debug, Default, Eq, PartialEq)]
pub struct Texture2D3D {
    /// Human-readable texture or image name.
    pub(crate) name: String,
    /// Base `LOD0` width in texels.
    #[get(type(copy))]
    pub(crate) width: u32,
    /// Base `LOD0` height in texels.
    #[get(type(copy))]
    pub(crate) height: u32,
    /// Color-space interpretation controlling mip filtering and shader decode.
    #[get(type(copy))]
    pub(crate) color_space: TextureColorSpace,
    /// Sampler wrap and filter configuration.
    #[get(type(copy))]
    pub(crate) sampler: TextureSampler3D,
    /// Ordered mipmap chain starting at full resolution (`mips[0]`).
    pub(crate) mips: Vec<TextureMipLevel3D>,
}