>_htmlhub
library/backgrounds/vanta-ripple

Vanta Ripple

Live previewPerformance varies by device
vanta-ripple.html

No account needed to copy or download. Check dependencies and thelicense status before publishing.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Vanta.js Ripple</title>
    <style>
      html,
      body {
        height: 100%;
        margin: 0;
        overflow: hidden;
        background: #f8f9fa;
        color: #151515;
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      }
      #vanta {
        position: fixed;
        inset: 0;
      }
    </style>
    <script src="../vendor/three.r134.min.js"></script>
    <script src="../vendor/p5.min.js"></script>
    <script src="../vendor/vanta/dist/vanta.ripple.min.js"></script>
  </head>
  <body>
    <div id="vanta"></div>
    <script>
      VANTA.RIPPLE({
        el: "#vanta",
        mouseControls: true,
        touchControls: true,
        gyroControls: false,
        color1: 0x2563eb,
        color2: 0x7dd3fc,
        backgroundColor: 0x0b1026,
        amplitudeFactor: 1.1,
        ringFactor: 4,
        rotationFactor: 0.12,
        speed: 0.9
      });
    </script>
</body>
</html>

About this animation

Vanta.js ripple shader with soft blue wave motion over a bright background.

Under the hood

Vanta.js Wide-Ring Ripple on a Dark Navy Ground

This delegates rendering to VANTA.RIPPLE() from Vanta.js on Three.js WebGL, mounted on a fixed full-viewport #vanta div. The ripple pairs blue color1: 0x2563eb with pale-sky color2: 0x7dd3fc, using a much wider ringFactor: 4 than the other ring-based effects here, a slow rotationFactor: 0.12, amplitudeFactor: 1.1 and speed: 0.9. It was darkened from its original light theme to backgroundColor: 0x0b1026 for wallpaper use, while the page itself is still set to a #f8f9fa background with dark #151515 text, and interaction is on via mouseControls: true and touchControls: true with gyroControls: false.

Source Code
Copied to clipboard