When to Use
Use@hyperframes/shader-transitions when you need to:
- Add shader-based scene transitions such as domain warp, whip pan, glitch, iris, light leak, or thermal distortion
- Attach GPU transitions to an existing GSAP timeline
- Build a transition picker or validation UI around the available shader registry
- Feature-detect native HTML-in-canvas capture support
- Use the producer’s deterministic page-side compositor for render-mode captures
- Render the finished composition to video - use the CLI or producer
- Edit composition structure programmatically - use sdk
- Build a visual editor surface - use studio
Package Exports
| Import | Description |
|---|---|
init() | Creates or augments a GSAP timeline with shader transitions |
SHADER_NAMES | Array of supported shader names for validation and UI pickers |
isHtmlInCanvasCaptureSupported() | Feature-detects Chrome’s native HTML-in-canvas capture path |
installPageSideCompositor() | Installs the render-mode compositor used by the producer path |
isPageSideCompositingSupported() | Checks whether page-side shader compositing is available |
Quick Start
Available Shaders
| Shader | Description |
|---|---|
domain-warp | Organic noise-based warp with a glowing edge |
ridged-burn | Ridged noise burn with sparks and heat glow |
whip-pan | Horizontal motion blur simulating a fast camera pan |
sdf-iris | Circular iris wipe with a glowing ring edge |
ripple-waves | Concentric ripple distortion radiating from center |
gravitational-lens | Warping gravity well with chromatic aberration |
cinematic-zoom | Radial zoom blur with chromatic fringing |
chromatic-split | RGB channel separation expanding from center |
glitch | Digital glitch with block displacement and scanlines |
swirl-vortex | Spiral rotation with noise-based warping |
thermal-distortion | Heat shimmer rising from the bottom |
flash-through-white | Flash to white, then reveal the next scene |
cross-warp-morph | Noise-driven morph blending both scenes |
light-leak | Warm cinematic light leak with lens flare |
SHADER_NAMES when you need a typed list:
Configuration
shader is optional. Omit it to use a CSS fallback transition at that point in the timeline.
Preview and Render Behavior
Browser previews pre-capture transition samples and cache matching snapshots in IndexedDB. Cache keys include the composition ID, scene DOM/style signatures, timing, capture FPS, scale, and dimensions, so normal page refreshes can reuse samples while runtime edits invalidate only adjacent transition caches. During producer renders, shader transitions use a deterministic page-side compositor instead of preview-time snapshot caching. That keeps frame capture seek-driven and avoids depending on wall-clock playback.Related Packages
@hyperframes/producer
Renders compositions that include shader transitions.
Transition Catalog
Browse installable transition blocks built on the shader system.