Animated 1D Perlin Noise


This example animates 1D Perlin noise, creating a smoothly evolving line chart. The offset is incremented at each animation frame, making the pattern move organically—perfect for generative art.

Useful links

Animated Perlin Noise

This chart visualizes 1D Perlin noise, but unlike the static version, the offset is automatically incremented at each animation frame. This creates a dynamic, flowing effect—ideal for generative art and creative coding.

The animation is achieved by updating the x-offset in the noise function on every frame, causing the line to move smoothly across the canvas.

Animated 1D Perlin noise visualization

Here’s a code snippet showing the core animation logic:

const offsetRef = useRef(0);
useEffect(() => {
  function draw() {
    // ... drawing logic ...
    offsetRef.current += 0.01; // Animate offset
    requestAnimationFrame(draw);
  }
  draw();
  return () => cancelAnimationFrame(draw);
}, [/* dependencies */]);

Distribution

Contact

👋 Hey, I'm Yan and I'm currently working on this project!

Feedback is welcome ❤️. You can fill an issue on Github, drop me a message on Twitter, or even send me an email pasting yan.holtz.data with gmail.com. You can also subscribe to the newsletter to know when I publish more content!