()
| 111 | } |
| 112 | |
| 113 | binnedNodes() { |
| 114 | const bins = {} |
| 115 | for (const node of this.nodes) { |
| 116 | const binKey = this.binKey(this.nodeBin(node)) |
| 117 | if (!bins[binKey]) { |
| 118 | bins[binKey] = [] |
| 119 | } |
| 120 | bins[binKey].push(node) |
| 121 | } |
| 122 | return bins |
| 123 | } |
| 124 | |
| 125 | update() { |
| 126 | Matter.World.remove(engine.world, this.springs) |