Class MeshParser

Hierarchy

  • MeshParser

Constructors

Methods

  • Parses the contents of a GLTF file and stores the scene in a Node3 object

    Parameters

    • document: Document

      The contents of the GLTF file

    • transform: Node3

      The transform to store the data

    Returns void

  • Recusrively parses a node in the GLTF file and stores the data in a Node3 object

    Parameters

    • node: Node

      The current node to parse in the GLTF file

    • parentTransform: Node3

    Returns void

  • Parses the contents of an OBJ file and stores the data in a given Mesh object

    Parameters

    • obj: string

      The contents of the object file as a string

    • mesh: Mesh3

      The Mesh object to store the data

    Returns void

  • Parses a face line from an OBJ file

    Parameters

    • line: string[]

      The face line to be parsed

    • indices: number[]

      An array to store the face indices

    • uvIndices: number[]

    Returns void

  • Parses a normal line from an OBJ file

    Parameters

    • line: string[]

      The normal line to be parsed

    • normals: number[]

      An array to store the normal coordinates

    Returns void

  • Parses a texture coordinate line from an OBJ file

    Parameters

    • line: string[]

      The texture coordinate line to be parsed

    • uvs: number[]

      An array to store the texture coordinates

    Returns void

  • Parses a vertex line from an OBJ file

    Parameters

    • line: string[]

      The line containing the vertex data

    • vertices: number[]

      The array to store the vertex positions

    • colors: number[]

      The array to store the vertex colors

    Returns void

  • Parses the contents of a PLY file and stores the data in a given Mesh object This function works for both ASCII or binary PLY files.

    Parameters

    • ply: ArrayBuffer

      The contents of the PLY file as an ArrayBuffer

    • mesh: Mesh3

      The Mesh object to store the data

    Returns void

Generated using TypeDoc