Type Alias PerimeterFunction

PerimeterFunction: ((bounds: Rectangle, vertex: CellState, next: Point, orthogonal: boolean) => Point | null)

Describes a perimeter for the given bounds.

Type declaration

    • (bounds, vertex, next, orthogonal): Point | null
    • Parameters

      • bounds: Rectangle

        the Rectangle that represents the absolute bounds of the vertex.

      • vertex: CellState

        the CellState that represents the vertex.

      • next: Point

        the Point that represents the nearest neighbour point on the given edge.

      • orthogonal: boolean

        Boolean that specifies if the orthogonal projection onto the perimeter should be returned. If this is false, then the intersection of the perimeter and the line between the next and the center point is returned.

      Returns Point | null

      the resulting Point projected to the perimeter.