Installation
Choose your framework. The registry installs one component file and its PixiJS dependency.
Installation unavailable
The preview is public, but its installable release is still being prepared.
The registry command writes the component to src/lib/components/ui/GlassPane.svelte and installs its dependencies.
The registry command writes the component to src/components/ui/GlassPane.tsx and installs its dependencies.
The registry command writes the component to src/components/ui/GlassPane.vue and installs its dependencies.
Overview
Glass Pane divides an image into a repeating refractive field with a cubic lens profile, RGB separation, and narrow specular highlights.
Rotation changes the panel field while the optional wave bends and gently animates its boundaries.
Basic usage
The shader fills its parent. Your layout decides whether that parent is a card, hero, or viewport.
- Set both Wave frequency and Wave amplitude above zero to reveal the animated panel motion.
- Use Image fit to preserve the source aspect ratio or deliberately stretch it across the canvas.
Component API
Types below match the selected Svelte component.
Additional classes for the parent-sized root element.
- Type
string
URL or data URL viewed through the refractive panel field.
- Type
string- Range / values
Image URL or data URL
Controls how the source image is placed inside the canvas.
- Type
"cover" | "fit" | "stretch"- Default
"cover"- Range / values
cover, fit, stretch
Rotation of the repeating glass field in degrees.
- Type
number- Default
60- Range / values
-180–180
Strength of image displacement and reflected highlights.
- Type
number- Default
0.15- Range / values
0–2
Separation of red and blue along the refracted axis.
- Type
number- Default
1- Range / values
0–3
Width of each repeating refractive panel.
- Type
number- Default
0.82- Range / values
0.2–2.5
Number of bends applied along the panel field.
- Type
number- Default
0- Range / values
0–16
Amount of animated lateral bending in the panels.
- Type
number- Default
0- Range / values
0–0.25
Animation speed of the panel wave.
- Type
number- Default
0- Range / values
0–2
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Enables pointer-driven effects when the shader supports them.
- Type
boolean- Default
false
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
Component public instance- Range / values
pause, resume, reset, resize, destroy
Types below match the selected React component.
Additional classes for the parent-sized root element.
- Type
string
URL or data URL viewed through the refractive panel field.
- Type
string- Range / values
Image URL or data URL
Controls how the source image is placed inside the canvas.
- Type
"cover" | "fit" | "stretch"- Default
"cover"- Range / values
cover, fit, stretch
Rotation of the repeating glass field in degrees.
- Type
number- Default
60- Range / values
-180–180
Strength of image displacement and reflected highlights.
- Type
number- Default
0.15- Range / values
0–2
Separation of red and blue along the refracted axis.
- Type
number- Default
1- Range / values
0–3
Width of each repeating refractive panel.
- Type
number- Default
0.82- Range / values
0.2–2.5
Number of bends applied along the panel field.
- Type
number- Default
0- Range / values
0–16
Amount of animated lateral bending in the panels.
- Type
number- Default
0- Range / values
0–0.25
Animation speed of the panel wave.
- Type
number- Default
0- Range / values
0–2
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Enables pointer-driven effects when the shader supports them.
- Type
boolean- Default
false
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
GlassPaneHandle- Range / values
pause, resume, reset, resize, destroy
Types below match the selected Vue component.
Additional classes for the parent-sized root element.
- Type
string
URL or data URL viewed through the refractive panel field.
- Type
string- Range / values
Image URL or data URL
Controls how the source image is placed inside the canvas.
- Type
"cover" | "fit" | "stretch"- Default
"cover"- Range / values
cover, fit, stretch
Rotation of the repeating glass field in degrees.
- Type
number- Default
60- Range / values
-180–180
Strength of image displacement and reflected highlights.
- Type
number- Default
0.15- Range / values
0–2
Separation of red and blue along the refracted axis.
- Type
number- Default
1- Range / values
0–3
Width of each repeating refractive panel.
- Type
number- Default
0.82- Range / values
0.2–2.5
Number of bends applied along the panel field.
- Type
number- Default
0- Range / values
0–16
Amount of animated lateral bending in the panels.
- Type
number- Default
0- Range / values
0–0.25
Animation speed of the panel wave.
- Type
number- Default
0- Range / values
0–2
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Enables pointer-driven effects when the shader supports them.
- Type
boolean- Default
false
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
Component public instance- Range / values
pause, resume, reset, resize, destroy