import { StaticRegions } from '@driftengine/physics';
Constructor
constructor(world: PhysicsWorld)
Accessors
| Name | Type | Description |
sizeget | number | How many regions are in the world. |
Methods
has(region: number): boolean
| Parameter | Type | Description |
region | number | |
bodyOf(region: number): number
The body index a region stands as now, or −1. It changes as other regions are removed.
| Parameter | Type | Description |
region | number | |
add(region: number, desc: BodyDesc): number
Add a region as one body. A region already in the world is refused rather than doubled.
| Parameter | Type | Description |
region | number | |
desc | BodyDesc | |
remove(region: number): void
Take a region out of the world. A region that is not there is nothing to remove.
| Parameter | Type | Description |
region | number | |