pub struct GlassDynamics {
pub edge_return_depth_dp: Option<f32>,
pub optical_projection: Option<(f32, f32)>,
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 touch_radius_dp: Option<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§
§edge_return_depth_dp: Option<f32>Independent inner return depth for an edge lens, in dp. Zero removes its depth. Nonfinite or negative values preserve the material’s default depth ratio.
optical_projection: Option<(f32, f32)>Horizontal and vertical projection of the complete glass field about its primary center. Refraction, lighting and all scene shapes share the projection. Missing, nonfinite or nonpositive scales resolve to identity. This does not magnify the underlying backdrop.
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: f32Extra specular intensity (0 = spec default; e.g. press boost).
saturation_boost: f32Per-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).
touch_radius_dp: Option<f32>Radius of the touch glow in dp; absent, nonpositive and nonfinite values use 58 dp.
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
impl GlassDynamics
Sourcepub fn touched_up(
self,
press: f32,
finger: Option<(f32, f32)>,
center: (f32, f32),
) -> Self
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
impl Clone for GlassDynamics
Source§fn clone(&self) -> GlassDynamics
fn clone(&self) -> GlassDynamics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more