Jello: frequency shift

by Chantal Roth

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Refractive Index Gradient & Gravitational Redshift/Blueshift</title>
<style>
  body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    font-family: sans-serif;
    color: #eee;
  }
  #container {
    width: 100vw;
    height: 100vh;
  }
  #info {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.6);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    max-width: 320px;
    pointer-events: none;
  }
  /* --- Updated Label CSS for Alignment --- */
  #labels {
    position: absolute;
    bottom: 150px;
    width: 100%;
    height: 0px; /* Don't block clicks */
    font-size: 13px;
    pointer-events: none;
  }
  .label-box {
    position: absolute;
    padding: 6px 10px;
    background: rgba(0,0,0,0.6);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    /* Center the box on its anchor point */
    transform: translateX(-50%);
    white-space: nowrap;
  }
  .label-title {
    font-weight: bold;
    margin-bottom: 4px;
  }
  /* Position specific labels to align with clocks at x=-4 and x=4 */
  #labels .label-box:nth-child(1) {
      left: 15%;
  }
  #labels .label-box:nth-child(2) {
      left: 85%;
  }
</style>

<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>
</head>
<body>
<div id="container"></div>

<div id="info">
  <b>Elastic-Solid Universe: Index Gradient</b><br>
  Left: near massive body → high refractive index, slower light, slower clocks, shorter wavelength, blue shift.<br>
  Right: far from mass → low index, faster light, faster clocks, longer...