Skip to main content
100%

Fork of Atoms and electrons 3D

✓ Published0🌍 Public
NNita
Last edited Aug 3, 2025
Created on Aug 3, 2025

A 3D cube constructed from a grid of colored spheres slowly rotates in a dark, foggy space. The scene uses Three.js with WebGL rendering, employing a perspective camera and orbit controls that let users drag to rotate and scroll to zoom. Each sphere’s hue is derived from its position within the cube, and lighting combines directional and ambient sources. The animation loop continuously rotates the group, with optional 3D text.

AI-generated description

Interactive 3D Sphere Cube

A 3D visualization of a cube made of colored spheres using Three.js.

Features

  • Interactive orbit controls (drag to rotate, scroll to zoom)
  • Responsive design that adapts to window size
  • Adjustable parameters in config.js
  • Color variation based on sphere position
  • Smooth animations

Setup

  1. Clone this repository
  2. Open index.html in a modern browser
  3. Use mouse/touch to interact with the 3D scene

Configuration

Edit config.js to change:

  • Sphere size and density
  • Cube dimensions
  • Camera settings
  • Animation speed
MIT Licensed

Similar vizzes