vas").getContext("2d");
  var direction = 0;

  function radToDeg(rad) {
    return rad * 180 / Math.PI;
  }

  function degToRad(deg) {
    return deg * Math.PI / 180;
  }

  webglLessonsUI.setupSlider("#rotation", {value: radToDeg(direction), slide: updateDirection, min: -180, max: 180 });

  function updateDirection(event, ui) {
    direction = degToRad(ui.value);
    render();
  }

  function render() {
    const isDarkMode = darkMatcher.matches;
    const colors = isDarkMode ? darkColors : lightColors;