Electron Level Transitions

by Chantal Roth

HTML

<body>
  <!-- Three.js r124 + OrbitControls + dat.GUI -->
  <script src="https://cdn.jsdelivr.net/npm/three@0.124.0/build/three.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/three@0.124.0/examples/js/controls/OrbitControls.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.7/dat.gui.min.js"></script>

  <style>
    html, body { margin:0; height:100%; overflow:hidden; background:#0b0e14; color:#eaeef2;
                 font:13px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; }
    #hud { position:absolute; left:12px; top:10px; z-index:5; pointer-events:none;
           background:rgba(20,24,33,0.7); padding:10px 12px; border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,0.25); }
    #hud b { color:#fff; }
    #status { margin-top:6px; opacity:0.9; }
    canvas { display:block; }
  </style>

  <div id="hud">
    <div><b>Spherical Harmonics → Orbital-style Lobes</b> (no quantum jumps)</div>
    <div>Drag = rotate • Wheel = zoom • Right/Shift-Drag = pan</div>
    <div id="status"></div>
  </div>

  <script>
    // ===== Scene / Camera / Renderer =====
    const scene = new THREE.Scene();
    scene.background = new THREE.Color(0x0b0e14);

    const camera = new THREE.PerspectiveCamera(45, window.innerWidth/window.innerHeight, 0.05, 200);
    camera.position.set(0, 1.5, 3.4);

    const renderer = new THREE.WebGLRenderer({ antialias:true });
    renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
    renderer.setSize(window.innerWidth, window.innerHeight);
    renderer.outputEncoding = THREE.sRGBEncoding;
    document.body.appendChild(renderer.domElement);

    const controls = new THREE.OrbitControls(camera, renderer.domElement);
    controls.enableDamping = true;
    controls.target.set(0,0,0);

    // Lighting
    scene.add(new THREE.HemisphereLight(0xffffff, 0x223344, 0.8));
    const dir = new THREE.DirectionalLight(0xffffff, 1.0);
   ...