<commit_before>if (typeof AFRAME === 'undefined') {
  throw new Error('Component attempted to register before AFRAME was available.');
}

/**
 * GridHelper component for A-Frame.
 */
AFRAME.registerComponent('gridhelper', {
  schema: {
    size: { default: 10 },
    step: { default: 1 },
    colorCenterLine: {default: "red"},
    colorGrid: {default: "black"}
  },

  /**
   * Called once when component is attached. Generally for initial setup.
   */
  init: function () {
    var scene = this.el.object3D;
    var data = this.data;

    var size = data.size;
    var step = data.step;
    var colorCenterLine = data.colorCenterLine;
    var colorGrid = data.colorGrid;

    var gridHelper = new THREE.GridHelper( size, step );
    gridHelper.setColors(colorCenterLine, colorGrid);
    gridHelper.name = "gridHelper";
    scene.add(gridHelper);
  },
  remove: function () {
    var scene = this.el.object3D;
    scene.remove(scene.getObjectByName("gridHelper"));
  }
});<commit_msg>move colors to gridhelper constructor<commit_after>if (typeof AFRAME === 'undefined') {
  throw new Error('Component attempted to register before AFRAME was available.');
}

/**
 * GridHelper component for A-Frame.
 */
AFRAME.registerComponent('gridhelper', {
  schema: {
    size: { default: 10 },
    step: { default: 1 },
    colorCenterLine: {default: "red"},
    colorGrid: {default: "black"}
  },

  /**
   * Called once when component is attached. Generally for initial setup.
   */
  init: function () {
    var scene = this.el.object3D;
    var data = this.data;

    var size = data.size;
    var step = data.step;
    var colorCenterLine = data.colorCenterLine;
    var colorGrid = data.colorGrid;

    var gridHelper = new THREE.GridHelper( size, step, colorCenterLine, colorGrid );
    gridHelper.name = "gridHelper";
    scene.add(gridHelper);
  },
  remove: function () {
    var scene = this.el.object3D;
    scene.remove(scene.getObjectByName("gridHelper"));
  }
});
{'fraction_non_alphanumeric': 0.13363821138211382, 'fraction_numerical': 0.00508130081300813, 'mean_word_length': 3.317982456140351, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3237266', 'n_tokens_mistral': 612, 'n_tokens_neox': 596, 'n_words': 162}