• Public
  • Public/Protected
  • All

Class SolidParser

Class used to load mesh data from OBJ content


  • SolidParser




  • Creates a new SolidParser


    • materialToUse: string[]

      defines the array to fill with the list of materials to use (it will be filled by the parse function)

    • babylonMeshesArray: Array<Mesh>

      defines the array to fill with the list of loaded meshes (it will be filled by the parse function)

    • loadingOptions: OBJLoadingOptions

      defines the loading options to use

    Returns SolidParser


Static FacePattern1Search playground for FacePattern1

FacePattern1: RegExp

Pattern used to detect a first kind of face (f vertex vertex vertex)

Static FacePattern2Search playground for FacePattern2

FacePattern2: RegExp

Pattern used to detect a second kind of face (f vertex/uvs vertex/uvs vertex/uvs)

Static FacePattern3Search playground for FacePattern3

FacePattern3: RegExp

Pattern used to detect a third kind of face (f vertex/uvs/normal vertex/uvs/normal vertex/uvs/normal)

Static FacePattern4Search playground for FacePattern4

FacePattern4: RegExp

Pattern used to detect a fourth kind of face (f vertex//normal vertex//normal vertex//normal)

Static FacePattern5Search playground for FacePattern5

FacePattern5: RegExp

Pattern used to detect a fifth kind of face (f -vertex/-uvs/-normal -vertex/-uvs/-normal -vertex/-uvs/-normal)

Static GroupDescriptorSearch playground for GroupDescriptor

GroupDescriptor: RegExp

Group descriptor

Static MtlLibGroupDescriptorSearch playground for MtlLibGroupDescriptor

MtlLibGroupDescriptor: RegExp

Material lib descriptor

Static NormalPatternSearch playground for NormalPattern

NormalPattern: RegExp

Pattern used to detect a normal

Static ObjectDescriptorSearch playground for ObjectDescriptor

ObjectDescriptor: RegExp

Object descriptor

Static SmoothDescriptorSearch playground for SmoothDescriptor

SmoothDescriptor: RegExp

Smooth descriptor

Static UVPatternSearch playground for UVPattern

UVPattern: RegExp

Pattern used to detect a UV set

Static UseMtlDescriptorSearch playground for UseMtlDescriptor

UseMtlDescriptor: RegExp

Use a material descriptor

Static VertexPatternSearch playground for VertexPattern

VertexPattern: RegExp

Pattern used to detect a vertex


parseSearch playground for parse

  • parse(meshesNames: any, data: string, scene: Scene, assetContainer: Nullable<AssetContainer>, onFileToLoadFound: (fileToLoad: string) => void): void
  • Function used to parse an OBJ string


    • meshesNames: any

      defines the list of meshes to load (all if not defined)

    • data: string

      defines the OBJ string

    • scene: Scene

      defines the hosting scene

    • assetContainer: Nullable<AssetContainer>

      defines the asset container to load data in

    • onFileToLoadFound: (fileToLoad: string) => void

      defines a callback that will be called if a MTL file is found

        • (fileToLoad: string): void
        • Parameters

          • fileToLoad: string

          Returns void

    Returns void


  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method