Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to load mesh data from OBJ content

Hierarchy

  • SolidParser

Index

Constructors

  • Creates a new SolidParser

    Parameters

    • materialToUse: string[]

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

    • babylonMeshesArray: 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

Properties

FacePattern1: RegExp

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

FacePattern2: RegExp

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

FacePattern3: RegExp

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

FacePattern4: RegExp

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

FacePattern5: RegExp

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

GroupDescriptor: RegExp

Group descriptor

LinePattern1: RegExp

Pattern used to detect a line(l vertex vertex)

LinePattern2: RegExp

Pattern used to detect a second kind of line (l vertex/uvs vertex/uvs)

LinePattern3: RegExp

Pattern used to detect a third kind of line (l vertex/uvs/normal vertex/uvs/normal)

MtlLibGroupDescriptor: RegExp

Material lib descriptor

NormalPattern: RegExp

Pattern used to detect a normal

ObjectDescriptor: RegExp

Object descriptor

SmoothDescriptor: RegExp

Smooth descriptor

UVPattern: RegExp

Pattern used to detect a UV set

UseMtlDescriptor: RegExp

Use a material descriptor

VertexPattern: RegExp

Pattern used to detect a vertex

Methods

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

    Parameters

    • 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

Legend

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

Settings

Theme