Perlin Noise

Installation

npm i @paper-design/shaders-react

Code

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

<PerlinNoise
  style={{ height: 500 }}
  colorBack="#632ad5"
  colorFront="#fccff7"
  proportion={0.35}
  softness={0.1}
  octaveCount={1}
  persistence={1}
  lacunarity={1.5}
  scale={1}
  rotation={0}
  speed={0.5}
/>

Props

NameDescriptionTypeValues
colorBackBackground colorstringHex, RGB, or HSL color
colorFrontForeground colorstringHex, RGB, or HSL color
proportionBlend point between 2 colors (0.5 = equal distribution)number0 to 1
softnessColor transition sharpness (0 = hard edge, 1 = smooth gradient)number0 to 1
octaveCountPerlin noise octaves number (more octaves for more detailed patterns)number1 to 8 (integer)
persistenceRoughness, falloff between octavesnumber0.3 to 1
lacunarityFrequency step, typically around 2. Defines how compressed the pattern isnumber1.5 to 10
scaleOverall zoom level of the graphicsnumber0.01 to 4
rotationOverall rotation angle of the graphicsnumber0 to 360
speedAnimation speednumber0 to 0.5

Description

Animated 3D Perlin noise with exposed controls