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/Crackle.svelte and installs its dependencies.
The registry command writes the component to src/components/ui/Crackle.tsx and installs its dependencies.
The registry command writes the component to src/components/ui/Crackle.vue and installs its dependencies.
Overview
Crackle builds five rotated layers of sharpened sine-cosine ridges. Recursive displacement bends them into a connected network that changes slowly over time.
The accumulated ridge height controls the color transition and supplies finite-difference normals for directional highlights, keeping the glow attached to every line.
Basic usage
The shader fills its parent. Your layout decides whether that parent is a card, hero, or viewport.
- Raise Ridge sharpness for thinner, more crystalline cracks; lower it for broad, soft fissures.
- Set Speed to zero for a static frame. Reduced-motion mode pauses the renderer automatically.
Component API
Types below match the selected Svelte component.
Additional classes for the parent-sized root element.
- Type
string
Color of the surface between the cracks.
- Type
string- Default
"#131315"
Color filling the crack network as it deepens.
- Type
string- Default
"#29305F"
Color added along the brightest crack crests.
- Type
string- Default
"#5867D3"
Color of the focused reflection from the virtual light.
- Type
string- Default
"#EEF0FF"
Animation speed of the evolving crack network.
- Type
number- Default
0.5- Range / values
0–3
Visible scale of the procedural field.
- Type
number- Default
1- Range / values
0.2–4
Strength of the recursive directional displacement.
- Type
number- Default
2- Range / values
0–3
Frequency growth applied between field layers.
- Type
number- Default
1.4- Range / values
1.1–1.9
How thin and crisp the crack lines are.
- Type
number- Default
6- Range / values
1–16
Intensity of the glow and specular reflections.
- Type
number- Default
1.6- Range / values
0–3
Horizontal direction of the virtual light in degrees.
- Type
number- Default
40- Range / values
0–360
Height of the virtual light above the surface in degrees.
- Type
number- Default
55- Range / values
0–90
Focus of the specular reflection along the cracks.
- Type
number- Default
48- Range / values
2–80
Darkening applied toward the outer edges.
- Type
number- Default
1- Range / values
0–1
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
Color of the surface between the cracks.
- Type
string- Default
"#131315"
Color filling the crack network as it deepens.
- Type
string- Default
"#29305F"
Color added along the brightest crack crests.
- Type
string- Default
"#5867D3"
Color of the focused reflection from the virtual light.
- Type
string- Default
"#EEF0FF"
Animation speed of the evolving crack network.
- Type
number- Default
0.5- Range / values
0–3
Visible scale of the procedural field.
- Type
number- Default
1- Range / values
0.2–4
Strength of the recursive directional displacement.
- Type
number- Default
2- Range / values
0–3
Frequency growth applied between field layers.
- Type
number- Default
1.4- Range / values
1.1–1.9
How thin and crisp the crack lines are.
- Type
number- Default
6- Range / values
1–16
Intensity of the glow and specular reflections.
- Type
number- Default
1.6- Range / values
0–3
Horizontal direction of the virtual light in degrees.
- Type
number- Default
40- Range / values
0–360
Height of the virtual light above the surface in degrees.
- Type
number- Default
55- Range / values
0–90
Focus of the specular reflection along the cracks.
- Type
number- Default
48- Range / values
2–80
Darkening applied toward the outer edges.
- Type
number- Default
1- Range / values
0–1
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
CrackleHandle- Range / values
pause, resume, reset, resize, destroy
Types below match the selected Vue component.
Additional classes for the parent-sized root element.
- Type
string
Color of the surface between the cracks.
- Type
string- Default
"#131315"
Color filling the crack network as it deepens.
- Type
string- Default
"#29305F"
Color added along the brightest crack crests.
- Type
string- Default
"#5867D3"
Color of the focused reflection from the virtual light.
- Type
string- Default
"#EEF0FF"
Animation speed of the evolving crack network.
- Type
number- Default
0.5- Range / values
0–3
Visible scale of the procedural field.
- Type
number- Default
1- Range / values
0.2–4
Strength of the recursive directional displacement.
- Type
number- Default
2- Range / values
0–3
Frequency growth applied between field layers.
- Type
number- Default
1.4- Range / values
1.1–1.9
How thin and crisp the crack lines are.
- Type
number- Default
6- Range / values
1–16
Intensity of the glow and specular reflections.
- Type
number- Default
1.6- Range / values
0–3
Horizontal direction of the virtual light in degrees.
- Type
number- Default
40- Range / values
0–360
Height of the virtual light above the surface in degrees.
- Type
number- Default
55- Range / values
0–90
Focus of the specular reflection along the cracks.
- Type
number- Default
48- Range / values
2–80
Darkening applied toward the outer edges.
- Type
number- Default
1- Range / values
0–1
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