Constructor
new BSP(width, height, options)
- Source:
Example
let bsp = new Bsp(30, 20);
bsp.calculate();
for (const r of bsp.rooms) {...}
for (const r of bsp.corridors) {...}
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
width |
Number | width of the base rectangle |
|||||||||||||||
height |
Number | height of the base rectangle |
|||||||||||||||
options |
Object |
Properties
|
Methods
calculate()
- Source:
Calculate it