Skip to content
pixi-silk
GitHub repository
Interface

GlassOptions

import type { GlassOptions } from 'pixi-silk/glass';

Options of Glass: the pane size plus every GlassStyle field.

Extends#

Properties#

PropertyTypeDescriptionInherited fromDefined in
bevel?numberWidth of the curved rim that refracts, in local units, at least 1. Default 22.GlassStyle.bevelglass/options.ts:20
blur?numberBackdrop blur radius in local units, at least 0. Default 18.GlassStyle.blurglass/options.ts:14
dispersion?numberColour split at the rim, 0 to 1. Default 0.35.GlassStyle.dispersionglass/options.ts:18
frost?numberMilky whitening, 0 to 1. Default 0.06.GlassStyle.frostglass/options.ts:22
grain?numberFilm grain amount, at least 0. Default 0.035.GlassStyle.grainglass/options.ts:36
height?numberPane height in local units. Default 160.-glass/Glass.ts:11
light?numberStrength of the sheen and the lit rim, at least 0. Default 0.8.GlassStyle.lightglass/options.ts:34
lightAngle?numberDirection the light comes from, in radians. 0 is right, -PI/2 is top. Default -3PI/4 (top left).GlassStyle.lightAngleglass/options.ts:32
opacity?numberOpacity of the glass and its shadow, 0 to 1. Default 1.GlassStyle.opacityglass/options.ts:30
radius?numberCorner radius in local units, at least 0. Default 28.GlassStyle.radiusglass/options.ts:10
refraction?numberHow far the rim shifts what is behind it, in local units. Negative bends the other way. Default 14.GlassStyle.refractionglass/options.ts:16
saturation?numberSaturation of what shows through, at least 0. 1 keeps it, 0 is grey, above 1 is more vivid. Default 1.2.GlassStyle.saturationglass/options.ts:24
shadow?numberOpacity of the soft drop shadow under the pane, 0 to 1. 0 turns it off. Default 0.3.GlassStyle.shadowglass/options.ts:38
smoothing?numberSquircle smoothing of the corners, 0 (circular arcs) to 1. Default 0.6.GlassStyle.smoothingglass/options.ts:12
tint?ColorSourceTint colour, any Pixi colour source. Default white.GlassStyle.tintglass/options.ts:26
tintAmount?numberHow much tint to mix in, 0 to 1. Default 0.04.GlassStyle.tintAmountglass/options.ts:28
width?numberPane width in local units. Default 240.-glass/Glass.ts:9