Fluted Glass

Click to change the sample image

Installation

npm i @paper-design/shaders-react

Code

import { FlutedGlass } from '@paper-design/shaders-react';

<FlutedGlass
  style={{ height: 500 }}
  count={80}
  shape="lines"
  angle={0}
  distortionShape="lens"
  distortion={0.5}
  shift={0}
  blur={3}
  highlights={0}
  scale={1}
  fit="cover"
  marginLeft={0}
  marginRight={0}
  marginTop={0}
  marginBottom={0}
/>

Props

NameDescriptionTypeValues
countNumber of grid linesnumber4 to 200 (integer)
shapeThe shape of the gridenum
| "pattern" | "wave" | "lines" | "linesIrregular" | "zigzag"
angleDirection of the grid relative to the imagenumber0 to 180
distortionShapeThe shape of the distortionenum
| "prism" | "lens" | "contour" | "cascade" | "facete"
distortionThe power of distortion applied within each stripenumber0 to 1
shiftTexture shift in direction opposite to the gridnumber-1 to 1
blurOne-directional blurnumber0 to 50
highlightsThin highlights along the grid linesnumber0 to 1
scaleOverall zoom level of the graphicsnumber0.5 to 10
fitHow the image fits the canvasenum
| "contain" | "cover"
marginLeftShowing original image on the leftnumber0 to 1
marginRightShowing original image on the rightnumber0 to 1
marginTopShowing original image on the topnumber0 to 1
marginBottomShowing original image on the bottomnumber0 to 1

Description

Fluted glass image filter transforms an image into streaked, ribbed distortions, giving a mix of clarity and obscurity