fast-mesh-wasm
    Preparing search index...

    Function computeVertexNormals

    • Computes smooth, area-weighted per-vertex normals.

      Parameters

      • positions: Positions

        Vertex positions. Length must be a multiple of 3.

      • indices: Indices

        Triangle indices. Length must be a multiple of 3.

      Returns Float32Array

      Normals with the same length as positions. Vertices not used by any triangle get [0, 0, 0].

      If a length is not a multiple of 3 or an index is out of range.