Class MeshLoader

Hierarchy

  • MeshLoader

Constructors

Methods

Constructors

Methods

  • Loads a GLTF file asynchronously.

    Returns

    A new Node3 object that will act as the root of the model once it is finished loading. Note, it will only contain the model data AFTER the asynchronous loading is complete.

    Parameters

    • filename: string

      The relative path to the file

    • callback: null | ((rootNode: Node3) => void) = null

      An optional callback that is called when the file has been loaded

    • recursive: boolean = true

    Returns Node3

  • Loads an OBJ file asynchronously

    Returns

    The Mesh3 object created to hold the model. Note, it will only contain the model data AFTER the asynchronous loading is complete.

    Parameters

    • filename: string

      The relative path to the OBJ file

    • callback: null | ((loadedMesh: Mesh3) => void) = null

      An optional callback that is called when the file has been loaded

    Returns Mesh3

  • Loads a PLY file asynchronously

    Returns

    The Mesh3 object created to hold the model. Note, it will only contain the model data AFTER the asynchronous loading is complete.

    Parameters

    • filename: string

      The relative path to the PLY file

    • callback: null | ((loadedMesh: Mesh3) => void) = null

      An optional callback that is called when the file has been loaded

    Returns Mesh3

Generated using TypeDoc