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

Vanta Halo

Live previewPerformance varies by device
vanta-halo.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 Halo</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.halo.min.js"></script>
  </head>
  <body>
    <div id="vanta"></div>
    <script>
      VANTA.HALO({
        el: "#vanta",
        mouseControls: true,
        touchControls: true,
        gyroControls: false,
        baseColor: 0x001a59,
        color2: 0xf2e735,
        backgroundColor: 0x11162e,
        amplitudeFactor: 1.15,
        ringFactor: 1.1,
        rotationFactor: 0.85,
        size: 1,
        speed: 0.9
      });
    </script>
</body>
</html>

About this animation

Vanta.js halo shader with rotating rings, blue depth, and gold highlights.

Under the hood

Vanta.js Rotating Halo Shader

This delegates rendering to VANTA.HALO() from Vanta.js on Three.js WebGL, mounted on a fixed full-viewport #vanta div. The halo uses deep blue baseColor: 0x001a59 with yellow color2: 0xf2e735 over backgroundColor: 0x11162e, shaped by amplitudeFactor: 1.15, ringFactor: 1.1 and rotationFactor: 0.85 at size: 1 and speed: 0.9. Interaction is on via mouseControls: true and touchControls: true, with gyroControls: false.

Source Code
Copied to clipboard