Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Function closestPointToPath

    • Find a point that is closest to the path (open or closed).

      Parameters

      • c: Point

        The reference point C

      • points: number[] | Point[]

        The points of the path P, which must not be empty

      • close: boolean

        If true, the edge from the last to the first point of the path is tested

      Returns Point

      The closest point to C on the path P