Glass: a frosted pane that blurs and bends what is behind it.
import { Glass, GlassFilter, lightVector, resolveGlass } from 'pixi-silk/glass';
Classes#
| Class | Description |
|---|
| Glass | A pane of frosted glass from pixi-silk/glass. It blurs and bends whatever is drawn behind it, splits colours at its curved rim, and catches light on the edge that faces the light. |
| GlassFilter | The frosted glass filter behind Glass. Prefer Glass: it sizes the filter, keeps it in step with the transform and turns on the WebGL back buffer the filter needs. |
Interfaces#
Variables#
| Variable | Description |
|---|
| GLASS_DEFAULTS | Default values of GlassStyle, tuned for a pane over bright, colourful content. The tint default is white. |
Functions#
| Function | Description |
|---|
| lightVector | Unit vector towards the light for an angle in radians, in screen space with y pointing down. |
| resolveGlass | Fills in GLASS_DEFAULTS and clamps each field to its range. Returns a new object every call. |