>_htmlhub
library/3d & webgl/vanta-waves

Vanta Waves

Live previewPerformance varies by device
vanta-waves.html

No account needed to copy or download. Check dependencies and thelicense status before publishing. Standalone download includes required libraries inline so it runs offline and in HTMLDeck.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Vanta.js Waves</title>
    <style>
      html,
      body {
        height: 100%;
        margin: 0;
        overflow: hidden;
        background: #07080d;
        color: #f5f7fb;
        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/vanta/dist/vanta.waves.min.js"></script>
  </head>
  <body>
    <div id="vanta"></div>
    <script>
      VANTA.WAVES({
        el: "#vanta",
        mouseControls: true,
        touchControls: true,
        gyroControls: false,
        color: 0x006d77,
        shininess: 42,
        waveHeight: 18,
        waveSpeed: 0.85,
        zoom: 0.92
      });
    </script>
</body>
</html>

About this animation

Vanta.js 3D wave plane with teal WebGL motion and interactive camera response.

Under the hood

Vanta.js Shiny Teal Wave Plane

This delegates rendering to VANTA.WAVES() from Vanta.js on Three.js WebGL, mounted on a fixed full-viewport #vanta div. The wave plane is teal color: 0x006d77 with a high shininess: 42, waveHeight: 18 and waveSpeed: 0.85, framed at zoom: 0.92, and it passes no backgroundColor so the dark page background shows through. Interaction is on via mouseControls: true and touchControls: true, with gyroControls: false.

Source Code
Copied to clipboard