This demo uses

  • three.js 0.165 (library, loaded from a CDN): draws the 3D scene, camera, lights and cubes
  • OrbitControls and DragControls (three.js add-ons): rotate the view, drag the cubes
  • Raycaster (part of three.js): works out which cube was double-clicked
  • Web Audio API (built into the browser): makes the pop sound
  • localStorage (built into the browser): saves cube positions, colors, deleted cubes and the camera as JSON text under the key threejs_cubes_state
  • No server: the save lives in this browser on this computer only