Interface DebrisCreatedEvent

Debris event payload — passed to DestructibleTerrainOptions.onDebrisCreated.

interface DebrisCreatedEvent {
    bodyId: {
        __brand: "BodyId";
    };
    contour: Contour;
    material: Material;
}

Properties

bodyId: {
    __brand: "BodyId";
}

The dynamic Box2D body the queue created. The caller owns its lifetime.

contour: Contour

Outer contour passed to the queue, in bitmap coordinates.

material: Material

Material used for the body's density / friction / restitution.