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

Vanta Globe

Live previewPerformance varies by device
vanta-globe.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 Globe</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.globe.min.js"></script>
  </head>
  <body>
    <div id="vanta"></div>
    <script>
      VANTA.GLOBE({
        el: "#vanta",
        mouseControls: true,
        touchControls: true,
        gyroControls: false,
        color: 0x4cc9f0,
        color2: 0xffffff,
        size: 1.05,
        backgroundColor: 0x10101a,
        points: 11,
        maxDistance: 22,
        spacing: 16,
        showDots: true
      });
    </script>
</body>
</html>

About this animation

Interactive Vanta.js globe network with connected points and cyan WebGL depth.

Under the hood

Vanta.js Cyan Point-and-Line Globe

This delegates rendering to VANTA.GLOBE() from Vanta.js on Three.js WebGL, mounted on a fixed full-viewport #vanta div. The globe is drawn in cyan color: 0x4cc9f0 with white color2: 0xffffff at size: 1.05 over backgroundColor: 0x10101a, with its point network set by points: 11, maxDistance: 22, spacing: 16 and showDots: true. Interaction is on via mouseControls: true and touchControls: true, with gyroControls: false.

Source Code
Copied to clipboard