General Relativity

by Chantal Roth

HTML

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>Elastic Universe Simulation (Three.js)</title>
  <style>
    body {
      margin: 0;
      overflow: hidden;
      font-family: sans-serif;
      background-color: #ffffff;
    }
    #container {
      width: 100vw;
      height: 100vh;
      position: relative;
    }
    #infoButton {
      position: absolute;
      top: 10px;
      left: 10px;
      padding: 8px 12px;
      z-index: 10;
      cursor: pointer;
      background-color: #ddd;
      border: 1px solid #888;
      border-radius: 4px;
      color: #000;
    }
    #infoPanel {
      position: absolute;
      top: 50px;
      left: 10px;
      width: 80%;
      max-height: 70vh;
      overflow-y: auto;
      background-color: rgba(245, 245, 245, 0.98);
      border: 1px solid #666;
      border-radius: 8px;
      padding: 15px;
      display: none;
      color: #000;
      z-index: 20;
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    /* Scrollbar */
    #infoPanel::-webkit-scrollbar {
      width: 10px;
    }
    #infoPanel::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 8px;
    }
    #infoPanel::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 8px;
    }
    #infoPanel::-webkit-scrollbar-thumb:hover {
      background: #555;
    }
    #statsPanel {
      position: absolute;
      top: 10px;
      right: 10px;
      padding: 10px;
      background-color: rgba(255,255,255,0.8);
      color: #000;
      font-size: 14px;
      border-radius: 4px;
      border: 1px solid #999;
      text-align: left;
    }
    #controlsPanel {
      position: absolute;
      left: 10px;
      bottom: 10px;
      padding: 10px;
      background-color: rgba(240,240,240,0.95);
      border: 1px solid #888;
      border-radius: 4px;
      color: #000;
      font-size: 14px;
      max-width: 240px;
    }
    #controlsPanel...