LavaUI docs GitHub

struct GlassEffect

Swift

struct GlassEffect

What .glassEffect(refraction:rim:frost:magnification:) asked for.

Sources/LavaUI/Modifiers.swift:24

Constructors

init(refraction: Float = 20, rim: Float = 1, frost: Float = 0, magnification: Float = 1)

Creates a glass description. Values outside their ranges are clamped.

Sources/LavaUI/Modifiers.swift:36

Properties

var frost: Float

The grain of frosted glass on what is behind the view, 0…1.

Sources/LavaUI/Modifiers.swift:30

var magnification: Float

How much bigger what is behind the view looks through it, about the view's centre. 1 is a flat pane.

Sources/LavaUI/Modifiers.swift:33

var refraction: Float

How far the very edge bends what is under it, in pixels.

Sources/LavaUI/Modifiers.swift:26

var rim: Float

Strength of the light the rim catches, 0…1.

Sources/LavaUI/Modifiers.swift:28