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

    A helper class used to construct triangulated polygon meshes Allow to add padding and a specific depth value.

    Index

    Constructors

    • Parameters

      • poly: number[] | Polygon

        Closed polygon to be processed and converted to a mesh (array of points or PIXI Polygon)

      • Optionaloptions: object = {}

        Various options : normalizing, offsetting, add depth, ...

      Returns PolygonMesher

    Properties

    indices: number[] = []

    Polygon mesh indices

    options: Record<string, number | boolean>

    Contains options to apply during the meshing process

    vertices: number[] = []

    Polygon mesh vertices

    _defaultOptions: Record<string, number | boolean> = ...

    Default options values

    Methods

    • Execute the triangulation to create indices

      Parameters

      • geometry: Geometry

        A geometry to update

      Returns Geometry

      The resulting geometry

    • Convert a flat points array into a 2 dimensional ClipperLib path

      Parameters

      • poly: number[] | Polygon

        PIXI.Polygon or points flat array.

      • Optionaldimension: number = 2

        The number of dimensions.

      Returns any

      The clipper lib path.