<commit_before>'use strict';

for (var i = 0; i < gameImages.length; i++)
  gameImages[i] = "img/" + gameImages[i];

// After loading all images, load scenes
loader.add(gameImages).load(function() {
  console.log("Loading " + sceneLoader.length + " scenes.");
  for (var i = 0; i < sceneLoader.length; i++) {
    console.log("Loading scene " + i);
    if (sceneLoader[i] != null)
      sceneLoader[i]();
    else
      console.log("ERROR: Failed to load scene " + i);
  }
  console.log("Finish");

  // Initial Scene
  setScene(2);
});<commit_msg>added a way to see load progress using console.log<commit_after>'use strict';

for (var i = 0; i < gameImages.length; i++)
  gameImages[i] = "img/" + gameImages[i];

var onProgressCallback = function(progressInfo) {
  console.log(progressInfo.progress.toFixed(1));
}

// After loading all images, load scenes
loader.add(gameImages)
  .on("progress", onProgressCallback)
  .load(function() {
    console.log("Loading " + sceneLoader.length + " scenes.");
    for (var i = 0; i < sceneLoader.length; i++) {
      console.log("Loading scene " + i);
      if (sceneLoader[i] != null)
        sceneLoader[i]();
      else
        console.log("ERROR: Failed to load scene " + i);
    }
    console.log("Finish");

    // Initial Scene
    setScene(2);
  });
{'fraction_non_alphanumeric': 0.1679506933744222, 'fraction_numerical': 0.00539291217257319, 'mean_word_length': 3.3156146179401995, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '5494202', 'n_tokens_mistral': 431, 'n_tokens_neox': 418, 'n_words': 109}