(world: World)
| 32 | * @param world - the world this broadphase will index |
| 33 | */ |
| 34 | export function createBroadphase(world: World): Broadphase { |
| 35 | if (world.sortOn === "depth") { |
| 36 | const aabb = new AABB3d(); |
| 37 | aabb.setMinMax(-10000, -10000, -10000, 10000, 10000, 10000); |
| 38 | return new Octree(world, aabb, collision.maxChildren, collision.maxDepth); |
| 39 | } |
| 40 | return new QuadTree( |
| 41 | world, |
| 42 | world.getBounds().clone(), |
| 43 | collision.maxChildren, |
| 44 | collision.maxDepth, |
| 45 | ); |
| 46 | } |
no test coverage detected