ment.querySelector('#canvas').getContext('2d');
  let direction = 0;
  const surfaceWidth = 200;

  const gradientLabels = [
    { label: '-x', rotation: Math.PI * 1.5, },
    { label: '+y', rotation: Math.PI, },
    { label: '+x', rotation: Math.PI * .5, },
    { label: '-y', rotation: 0, },
  ];
  const envGradients = [];
  for (let i = 0; i < 4; ++i) {
    const grad = ctx.createLinearGradient(-125, 0, 125, 0);
    for (let j = 0; j <= 20; ++j) {
      grad.addColorStop(1 - j / 20, hsl((i + j / 20) / 4, 