Skip to main content
100%

3D Cube of Spheres

✓ Published47🌍 Public
CCurran Kelleher
Last edited May 23, 2025
Created on Mar 19, 2025

This visualization displays a 4x4x4 cube composed of 64 colored spheres, with a hue gradient varying across each axis and a gentle rotation animation over a dark, starry background. The scene is rendered in WebGL using Three.js, featuring perspective projection, directional and ambient lighting, and interactive orbit controls for rotating, zooming, and panning. The code organizes configuration parameters in a separate module and uses `THREE.SphereGeometry`, `MeshPhongMaterial`, and `OrbitControls` to construct and manipulate the 3D environment.

AI-generated description

4x4x4 Cube of Spheres Visualization

This project shows a 3D visualization of a 4x4x4 cube made of colored spheres.

Features

  • 64 spheres arranged in a 4x4x4 cube
  • Color gradient across the spheres
  • Interactive camera controls (rotate, zoom, pan)
  • Gentle rotation animation
  • Starry background

Technologies Used

  • Three.js for 3D rendering
  • JavaScript ES modules
  • HTML5 and CSS

Limitations

  • Currently, all the code needs to live in a single source file, since relative imports are not yet supported in the VizHub Runtime
MIT Licensed

Similar vizzes