CrazyGLCrazyGLHomeExploreGitHubBrowse heroesLoading hero…← Back to gallery@crazygl/glass-cube-maze

Glass Cube Maze

Raymarched lattice of transparent glass cubes drifting in 3D space. The cursor orbits the camera, and chromatic dispersion paints rainbow rims along the hits.

ReactWebGLImageInteractiveFont#glass#cubes#raymarching#refraction#chromatic-aberration#premium

Usage

import GlassCubeMaze from '@crazygl/hero-glass-cube-maze';

export default function Page() {
  return (
    <GlassCubeMaze
      backgroundImage="/your-scene.jpg"
      chromatic={0.25}
      spacing={2.2}
    />
  );
}

Customise

  • BackgroundbackgroundImage (refracted through every cube), or skyTop / skyBottom for a procedural sky when empty.
  • Cubestint, rimColor, cubeSize, spacing, cornerRound, refraction, chromatic (dispersion), fresnel, rotateSpeed, randomness (0 = strict grid → 1 = scattered cloud).
  • CameracenterX, centerY, orbitStrength (pointer swing), fov.
  • 3D contentembedContent3D rasterises the heading onto a billboard plane refracted by the cubes.

Best for

  • Premium SaaS launch pages and product reveals.
  • Design / creative studio sites and high-end agency portfolios.
  • Optics, jewellery, and luxury product landing pages that want a tactile, optical centerpiece.
01 · Install the package

One command, zero config.

npm install @crazygl/hero-glass-cube-maze
02 · Render the component

Import once, drop it in.

The component takes the same props you see in the live customizer on the right — every default ships poster-quality.

hero.tsx
import GlassCubeMaze from '@crazygl/hero-glass-cube-maze';

export default function Landing() {
  return (
    <GlassCubeMaze />
  );
}
03 · Use it in a page

SSR-safe by default.

The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.

page.tsx
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';

import GlassCubeMaze from '@crazygl/hero-glass-cube-maze';

export default function Page() {
  return (
    <section>
      <GlassCubeMaze
        heading="Say hi."
        subheading="Your new hero."
      />
      <article>
        <h2>Welcome</h2>
        <p>Your content keeps its own voice below the hero.</p>
      </article>
    </section>
  );
}
You might also like

Similar heroes

Crystal Refraction Field

Six raymarched octahedral crystals drift across the screen, refracting the background through each face with per-channel chromatic dispersion at the rim.

Glass Panels

Liquid-glass panels in WebGL — half-sphere bevel, biconvex refraction (entry + exit + thickness), edge-weighted blur mix, multi-light Blinn-Phong specular, Fresnel rim, drop shadow. Drop in any background image and it gets bent through the glass.

Rain on Glass

Looking through a glass pane in the rain — droplets refract the background, slide down with gravity, and leave thin trails.

Liquid Data Core

A glowing ray-marched glass sphere with refracted, dispersed inner orbits of data points — a living analytics engine that reacts to the cursor.

Logo Inside a Crystal

A slowly rotating crystal prism (3D ray-marched rounded cube) with your logo suspended inside as a glowing emissive mesh. Per-channel IOR refraction on the cube faces splits white light into rainbow seams; caustic highlights pool on the virtual floor; soft bloom on the inner emission.

Typography Through Rainy Glass

A large bright headline sits behind a fogged glass pane covered in sliding water droplets. The drops refract the type; the cursor wipes a clear arc as you move.
Live customizer

Glass Cube Maze

Background imageVisible through every cube. Procedural sky used if empty.Sky top (procedural)Sky bottom (procedural)Glass tintRimCube size0.38Lattice spacing2.2Distance between cube centres along each axis.Randomness00 = strict grid, 1 = each cube wanders + scales away from its cell. Capped so cubes never overlap.Corner round0.06Refraction1Chromatic dispersion0.25Fresnel1Lattice spin0.18Centre X0Horizontal offset of the camera target / lattice centre.Centre Y0Vertical offset of the camera target.Pointer orbit0.21How far the cursor swings the camera.FOV2Embed content in 3DRasterise the heading + subheading onto a billboard plane in the lattice. Cubes nearer the camera occlude the text; cubes farther away are hidden by it; refraction passes through the panel + bg as one composited layer. Only the Heading content type is supported.Heading FontInteractivityWhich input drives the hero — try Scroll if you want the page to drive motion.
CrazyGL · crazygl.comProgrammable hero sections for real websites.