<commit_before>'use strict';

(function(){
  var roadImage = new Image();
  roadImage.onload = function(){
    var canvas = document.getElementById('game-canvas'),
        scrW = canvas.width,
        scrH = canvas.height,
        scrDepth = scrW,
        centerX = scrW / 2,
        centerY = scrH / 2,
        imgW = roadImage.width,
        imgH = roadImage.height,
        imgPartW = imgW / 2,
        imgPartH = imgH / 4,
        ctx = canvas.getContext('2d');

    canvas.mozImageSmoothingEnabled = false;
    canvas.webkitImageSmoothingEnabled = false;
    canvas.msImageSmoothingEnabled = false;
    canvas.imageSmoothingEnabled = false;

    ctx.fillRect(0, 0, scrW, scrH);

    function drawRoadSlice(scale, number) {
      var destW = imgPartW * scale,
          destH = imgPartH * scale,
          destX = centerX - destW / 2,
          destY = centerY - destH / 2;

      ctx.drawImage(roadImage, 0, imgPartH * number, imgPartW, imgPartH,
                    destX, destY, destW, destH);
    }

    drawRoadSlice(0.5, 0);
    /*
    for (var z = scrDepth; z >= 1; z -= 4) {
      var scale = 1.0 * scrDepth / (z * scrDepth);
      drawRoadSlice(scale, 0);
    }
    */
  };
  roadImage.src = 'road04_13.png';
})();<commit_msg>Perspective thing<commit_after>'use strict';

(function(){
  var roadImage = new Image();
  roadImage.onload = function(){
    var canvas = document.getElementById('game-canvas'),
        scrW = canvas.width,
        scrH = canvas.height,
        scrDepth = scrW,
        centerX = scrW / 2,
        centerY = scrH / 2,
        imgW = roadImage.width,
        imgH = roadImage.height,
        imgPartW = imgW / 2,
        imgPartH = imgH / 4,
        ctx = canvas.getContext('2d');

    canvas.mozImageSmoothingEnabled = false;
    canvas.webkitImageSmoothingEnabled = false;
    canvas.msImageSmoothingEnabled = false;
    canvas.imageSmoothingEnabled = false;

    ctx.fillRect(0, 0, scrW, scrH);

    function drawRoadSlice(scale, number) {
      var destW = imgPartW * scale,
          destH = imgPartH * scale,
          destX = centerX - destW / 2,
          destY = centerY - destH / 2;

      destY = centerY - destH / 4;

      ctx.drawImage(roadImage, 0, imgPartH * number, imgPartW, imgPartH,
                    destX, destY, destW, destH);
    }

    for (var z = scrDepth; z >= 1; z -= (scrDepth / 20)) {
      var scale = scrDepth / (z * 4);
      drawRoadSlice(scale, 0);
    }
  };
  roadImage.src = 'road04_13.png';
})();
{'fraction_non_alphanumeric': 0.12429378531073447, 'fraction_numerical': 0.01694915254237288, 'mean_word_length': 2.1579617834394904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6102885', 'n_tokens_mistral': 864, 'n_tokens_neox': 814, 'n_words': 195}