API

Class for generating OBJ data from a Babylon scene.

Index
  • Exports the material(s) of a mesh in .MTL file format (text)

    Parameters

    • mesh: Mesh

      defines the mesh to extract the material from

    • materialName: string = "mat1"

      defines the name of the material in the output (default is 'mat1')

    Returns string

    the mtl content

  • Exports the geometry of a Mesh array in .OBJ file format (text)

    Parameters

    • meshes: Mesh[]

      defines the list of meshes to serialize

    • Optionalmaterials: boolean

      defines if materials should be exported

    • Optionalmatlibname: string

      defines the name of the associated mtl file

    • Optionalglobalposition: boolean

      defines if the exported positions are globals or local to the exported mesh

    Returns string

    the OBJ content