Expand description
The Liquid Glass material: Gaussian backdrop frost followed by wcKSRD
refraction applied to a composable’s own bounds through
LiquidModifierExt::glass_effect — the analogue of SwiftUI’s
.glassEffect(_:in:).
Structs§
- Glass
- Builder describing a glass material. Resolved against the theme at the composition site, then evaluated per frame for density and dynamics.
- Glass
Deformation - A normalized motion axis and reciprocal scales for incompressible glass. Construction derives the cross-axis scale, so callers cannot describe a deformation that changes the bubble’s area.
- Glass
Dynamics - Per-frame motion inputs for an interactive glass element, read lazily at scene-build time (no recomposition per frame).
- Glass
Morph - A liquid shapeshift frame: the primary shape plus any number of nearby
glass shapes, ALL smooth-unioned into one field — liquid glass glues to
whatever glass it passes near (a growing menu necks with a neighboring
button, the drag lens merges with the search circle). Up to
GlassMorph::MAX_SHAPESextra shapes; an angular wobble makes the mid-flight field bubble like a droplet. All geometry is node-local dp:(center_x, center_y, width, height, corner_radius); radius sentinel-1means capsule;-2means SUBTRACT capsule — the shape carves a smooth hole in the field (the growing menu leaves its anchor button crisp on top until it swallows it). - Glass
Shadow - Shadow owned by a glass surface. Morphing glass evaluates the same live SDF for this shadow; clipped static glass forwards the values to the layer shadow primitive.
Enums§
- Glass
Variant - Material variant, mirroring SwiftUI’s
.regular/.clearglass, plus the interactive lens. - Liquid
Shape - The shape of a glass element (also its clip and shadow shape).
Traits§
- Liquid
Modifier Ext - Modifier extension installing the Liquid Glass material.
Functions§
- glass_
light_ direction - The current ambient glass light return direction.
- set_
glass_ light_ direction - Sets the ambient glass light return direction (screen space, need not be normalized — the shader normalizes). Feed device attitude here.