Lens Distortion
lens-distortionLens Distortion image filter separates an image into shifting color layers (recreating the chromatic aberration of a lens) and warps the image geometry, curving it outward or inward like barrel and pi
Install
$ npx paper-motion add lens-distortionAdds the background to brand/shader-set/set.json; use it with B.shader().
Tune it, then add it to your kit
Live shader
Parameters
spread
bias
angle
{
"id": "lens-distortion",
"shader": "LensDistortion",
"props": {
"fit": "cover",
"spread": 0.6,
"bias": 1,
"angle": 0,
"perspective": 0.1,
"count": 35,
"dispersion": 1,
"dispersionColor": 0.6,
"focusCenter": 0.8,
"focusEdges": 1,
"swirl": 0.35
},
"image": "assets/materials/material-a.jpg",
"motion": {
"param": "swirl",
"from": 0.1,
"to": 0.6
}
}Defaults
Notes
- Paper shader
LensDistortion(still). - Uses an image (installed to brand/assets/materials/); swap
imagefor your own picture or texture. - Breathes on
swirlfrom 0.1 to 0.6 so a still shader stays alive.
Spec
- Id
- lens-distortion
- Type
- Backgrounds
- Version
- 1.0.0
- Engine
- >=0.2.0
- License
- MIT