<commit_before>part of compass;

class Layer extends InteractiveObject {
  List<DisplayObject> children;
  bool interactiveChildren;
  
  Layer() {
    children = [];
    interactiveChildren = true;
  }
  
  addChild(DisplayObject node) {
    node.removeFromParent();
    node.parent = this;
    children.add(node);
  }
  
  removeChild(DisplayObject node) {
    if(children.remove(node)){
      node.parent = null;
    }
  }
  
  render(Renderer renderer) {
    children.forEach((child) => child.render(renderer));
  }
}<commit_msg>add removeChildren method to Layer<commit_after>part of compass;

class Layer extends InteractiveObject {
  List<DisplayObject> children;
  bool interactiveChildren;
  
  Layer() {
    children = [];
    interactiveChildren = true;
  }
  
  addChild(DisplayObject node) {
    node.removeFromParent();
    node.parent = this;
    children.add(node);
  }
  
  removeChild(DisplayObject node) {
    if(children.remove(node)){
      node.parent = null;
    }
  }
  
  removeChildren() {
    children.forEach((child) => child.parent = null);
    children.clear();
  }
  
  render(Renderer renderer) {
    children.forEach((child) => child.render(renderer));
  }
}
{'fraction_non_alphanumeric': 0.12258606213266163, 'fraction_numerical': 0.0, 'mean_word_length': 3.257142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '5599440', 'n_tokens_mistral': 371, 'n_tokens_neox': 366, 'n_words': 69}