Skip to main content

GlassDynamics

Struct GlassDynamics 

Source
pub struct GlassDynamics {
    pub activity: Option<f32>,
    pub resting_tint: Option<Color>,
    pub highlight_boost: f32,
    pub saturation_boost: f32,
    pub tint_alpha_multiplier: Option<f32>,
    pub morph: Option<GlassMorph>,
    pub touch: Option<(f32, f32, f32)>,
    pub press_depth: Option<f32>,
}
Expand description

Per-frame motion inputs for an interactive glass element, read lazily at scene-build time (no recomposition per frame).

Fields§

§activity: Option<f32>

Continuous optical presence. None preserves the resolved material; Some(0) is an exact backdrop identity while retaining the same node, SDF, and pointer ride path.

§resting_tint: Option<Color>

Base tint of the same persistent SDF surface at zero optical activity. Its alpha cross-fades out as the refractive material rises.

§highlight_boost: f32

Extra specular intensity (0 = spec default; e.g. press boost).

§saturation_boost: f32

Per-frame saturation added to the resolved material. Interactive surfaces use this to raise chroma without changing their base tint.

§tint_alpha_multiplier: Option<f32>

Optional per-frame multiplier for the material tint alpha. Values below one clear a resting wash; values above one densify a raised tint.

§morph: Option<GlassMorph>

Shape morph: when set, the glass geometry is these node-local rects instead of the node cover — the shapeshift channel.

§touch: Option<(f32, f32, f32)>

Touch glow: (x_dp, y_dp, intensity) in node-local dp. A pressed surface concentrates saturation and a soft light in a radial gradient under the finger (never a flat recolor).

§press_depth: Option<f32>

Dome press depth: how squashed the interactive dome is. At 1 the pressed dome refracts deep and vivid (wide rim band, strong chromatic split — the reference toggle’s gray-hold rainbow); toward 0 the released bead relaxes shallow and its split fades with it (the reference’s thin settled ring). None = 1.

Implementations§

Source§

impl GlassDynamics

Source

pub fn touched_up( self, press: f32, finger: Option<(f32, f32)>, center: (f32, f32), ) -> Self

The universal touched-up state (user-directed law): a pressed liquid surface comes closer to the user while its OWN colors go HDR-bright and saturated, with a radial glow following the finger. Never a repaint with alternate colors — the boosts amplify whatever the surface already is. press is 0..1; finger is node-local dp (falls back to center, the surface’s own heart).

Trait Implementations§

Source§

impl Clone for GlassDynamics

Source§

fn clone(&self) -> GlassDynamics

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlassDynamics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GlassDynamics

Source§

fn default() -> GlassDynamics

Returns the “default value” for a type. Read more
Source§

impl PartialEq for GlassDynamics

Source§

fn eq(&self, other: &GlassDynamics) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GlassDynamics

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.