GlassStyleScope

Receiver for Glass appearance property writes.

Property functions validate values while the Style is constructed and record them for later replay. Invalid direct Glass numbers throw IllegalArgumentException. Calling a function again records a later write which takes precedence.

Functions

Link copied to clipboard
fun alpha(alpha: Float)

Sets finite overall material opacity in the inclusive range 0f..1f.

Link copied to clipboard
fun ambientResponse(response: Float)

Sets finite ambient-light response in the inclusive range 0f..1f.

Link copied to clipboard
fun chromaMultiplier(multiplier: Float)

Sets the finite chroma multiplier in the inclusive range 0f..2f.

Link copied to clipboard

Sets the quality mode used to render chromatic aberration.

Link copied to clipboard

Sets finite chromatic dispersion strength in the inclusive range 0f..1f.

Link copied to clipboard

Sets the finite blend between generated and captured normals in inclusive 0f..1f.

Link copied to clipboard
fun contrast(contrast: Float)

Sets finite contrast adjustment in the inclusive range -1f..1f.

Link copied to clipboard
fun edgeSoftness(softness: Dp)

Sets a specified, finite, non-negative softening distance around the material boundary. There is no authored upper limit.

Link copied to clipboard
fun focused(response: GlassInteractionScope.() -> Unit)

Declares the response evaluated by each node while it is focused.

Link copied to clipboard
fun fresnelExponent(exponent: Float)

Sets a finite, non-negative exponent controlling Fresnel response falloff. There is no authored upper limit.

Link copied to clipboard
fun hovered(response: GlassInteractionScope.() -> Unit)

Declares the response evaluated by each node while it is hovered.

Link copied to clipboard

Sets the interaction-light radius as a fraction of the material's shortest side.

Link copied to clipboard

Sets the animation used when the interaction light moves to a new position.

Link copied to clipboard
fun lightPosition(alignment: Alignment)

Aligns the virtual light within each material's measured bounds.

Link copied to clipboard
fun optics(optics: GlassOptics)

Sets the optical model used to refract and blur captured content.

fun optics(refractionStrength: Float = 0.7f, refractionHeightFraction: Float = 0.25f, refractionDisplacement: Dp = 15.dp, depth: Float = 1.0f, blurRadius: Dp = 14.dp, progressive: HazeProgressive? = null)

Sets a complete fixed optical model used to refract and blur captured content.

Link copied to clipboard
fun pressed(response: GlassInteractionScope.() -> Unit)

Declares the response evaluated by each node while it is pressed.

Link copied to clipboard

Sets the rounded boundary used for refraction and masking.

Link copied to clipboard
fun specularExponent(exponent: Float)

Sets a finite, non-negative exponent controlling specular highlight concentration. There is no authored upper limit.

Link copied to clipboard
fun specularIntensity(intensity: Float)

Sets finite specular-highlight intensity in the inclusive range 0f..1f.

Link copied to clipboard

Sets the cross-section profile used by the refraction bezel.

Link copied to clipboard
fun tint(color: Color)

Sets any specified tint, including transparent, applied to refracted content.

Link copied to clipboard
fun whitePoint(whitePoint: Float)

Sets finite white-point adjustment in the inclusive range -1f..1f.