Bitbybit Docs
    Preparing search index...

    Function windingComponents

    • Finds which triangles of a mesh to turn over so that every edge two triangles share is run one way by one and the other way by the other, and which connected piece each triangle belongs to. The first triangle of each piece keeps its winding; an edge shared by more than two triangles is not followed.

      Parameters

      • indices: ArrayLike<number>

        Triangle corners, three per triangle

      • Optionalstart: number

        The first index of the range to read

      • Optionalend: number

        The index after the range to read

      Returns WindingComponents

      For each triangle of the range, whether to turn it over and its piece, and how many pieces there are