Skip to main content
Public

Share visualization

Loading preview…

3D Cube of Spheres

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

3D Cube of Spheres

40
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

Comments

Sign in to join the discussion.

MIT Licensed