manifold-3d
    Preparing search index...

    Function readMesh

    • Read an input mesh into Manifold-compatible data structures, whether it contains the EXT_mesh_manifold extension or not.

      Parameters

      • mesh: Mesh

        The Mesh to read.

      • attributes: (
            | "POSITION"
            | "NORMAL"
            | "TANGENT"
            | "TEXCOORD_0"
            | "TEXCOORD_1"
            | "COLOR_0"
            | "JOINTS_0"
            | "WEIGHTS_0"
            | "SKIP_1"
            | "SKIP_2"
            | "SKIP_3"
            | "SKIP_4"
        )[] = []

        An array of attributes representing the order of desired properties returned in the vertProperties array of the output mesh. If omitted, this will be populated with the union of all attributes defined in the primitives of the input mesh. If present, the first entry must be 'POSITION', and any attributes in the primitives that are not included in this list will be ignored, while those in the list but not defined in a primitive will be populated with zeros.

      Returns null | { mesh: MeshOptions; runProperties: Properties[] }

      The returned mesh is suitable for initializing a Manifold or Mesh of the Manifold library if desired. See Manifold documentation if you prefer to use these GL arrays in a different library. The runProperties array gives the Material and attributes list associated with each triangle run, which in turn corresponds to a primitive of the input mesh. These attributes are the intersection of the attributes present on the primitive and those requested in the attributes input.