Skip to main content

Module material

Module material 

Source
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.
GlassDeformation
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.
GlassDynamics
Per-frame motion inputs for an interactive glass element, read lazily at scene-build time (no recomposition per frame).
GlassMorph
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_SHAPES extra 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 -1 means capsule; -2 means 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).
GlassShadow
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§

GlassVariant
Material variant, mirroring SwiftUI’s .regular / .clear glass, plus the interactive lens.
LiquidShape
The shape of a glass element (also its clip and shadow shape).

Traits§

LiquidModifierExt
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.