(key)
| 20 | } |
| 21 | |
| 22 | remove(key) { |
| 23 | const child = this.getObject(key); |
| 24 | const index = this.children.indexOf(child); |
| 25 | if (~index) { |
| 26 | this.children.splice(index, 1); |
| 27 | this.weights.splice(index, 1); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | removeAll() { |
| 32 | this.children = []; |