Bitbybit Docs
    Preparing search index...

    Function windingRepairs

    • Finds which triangles of a mesh wind against the rest of their connected piece and should be turned over: within each piece, the winding most of its area already has is kept, so a few faces written inside out are mended while a piece wound inward on purpose, such as the inside of a hollow profile, stays as it is.

      Parameters

      • positions: ArrayLike<number>

        Flat x, y, z triples

      • 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 Uint8Array

      For each triangle of the range, 1 where it should be turned over