Interface TerrainPhysics

The physics integration of a DestructibleTerrain.

interface TerrainPhysics {
    adapter: Box2DAdapter;
    queue: DeferredRebuildQueue;
    worldId: {
        __brand: "WorldId";
    };
}

Properties

Properties

adapter: Box2DAdapter

The body lifecycle adapter. Exposed so users can read the chunk body map or create their own (debris) bodies in the same world.

The deferred rebuild queue. Exposed so users can enqueueDebris with their own contours when they detect detached chunks.

worldId: {
    __brand: "WorldId";
}

Box2D world the terrain attaches its bodies to.