Documentation

GridDistortion

Interactive grid distortion controlled by mouse position

Props

intensitynumber
Default:1
Strength of the distortion effect
decaynumber
Default:3
Rate of distortion decay (higher = faster)
radiusnumber
Default:1
Radius of the distortion effect
gridSizenumber
Default:20
Resolution of the distortion grid (higher = more detailed)
edges"stretch" | "transparent" | "mirror" | "wrap"
Default:stretch
How to handle edges when distortion pushes content out of bounds

Usage

<Shader>
  <GridDistortion
    intensity={1}
    radius={1}
  >
    <Circle />
  </GridDistortion>
</Shader>