(node, maxLevel)
| 454 | |
| 455 | // verify max depth: walk the tree and check no node exceeds level 2 |
| 456 | const checkMaxLevel = (node, maxLevel) => { |
| 457 | expect(node.level).toBeLessThanOrEqual(maxLevel); |
| 458 | for (const child of node.nodes) { |
| 459 | checkMaxLevel(child, maxLevel); |
| 460 | } |
| 461 | }; |
| 462 | checkMaxLevel(world.broadphase, 2); |
| 463 | |
| 464 | // all items should still be retrievable |