Interface Island

A connected component of solid cells that is not anchored.

Produced by flood-fill island detection: solid cells reachable from the anchor set (e.g. the bottom row of the world) are considered part of the static terrain; everything else forms one or more Islands that the physics layer can promote into dynamic debris bodies.

interface Island {
    bounds: {
        maxX: number;
        maxY: number;
        minX: number;
        minY: number;
    };
    cells: Point[];
}

Properties

Properties

bounds: {
    maxX: number;
    maxY: number;
    minX: number;
    minY: number;
}

Tight bounding box of the island, inclusive on both axes.

cells: Point[]

Cells belonging to this island in BFS visitation order.