Class SolidParser
Constructors
constructor
-
new SolidParser(
materialToUse: string[],
babylonMeshesArray: Mesh[],
loadingOptions: OBJLoadingOptions,
): SolidParserCreates 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
- materialToUse: string[]
Properties
StaticFace Pattern1
Pattern used to detect a first kind of face (f vertex vertex vertex)
StaticFace Pattern2
Pattern used to detect a second kind of face (f vertex/uvs vertex/uvs vertex/uvs)
StaticFace Pattern3
Pattern used to detect a third kind of face (f vertex/uvs/normal vertex/uvs/normal vertex/uvs/normal)
StaticFace Pattern4
Pattern used to detect a fourth kind of face (f vertex//normal vertex//normal vertex//normal)
StaticFace Pattern5
Pattern used to detect a fifth kind of face (f -vertex/-uvs/-normal -vertex/-uvs/-normal -vertex/-uvs/-normal)
StaticGroup Descriptor
Group descriptor
StaticLine Pattern1
Pattern used to detect a line(l vertex vertex)
StaticLine Pattern2
Pattern used to detect a second kind of line (l vertex/uvs vertex/uvs)
StaticLine Pattern3
Pattern used to detect a third kind of line (l vertex/uvs/normal vertex/uvs/normal)
StaticMtl Lib Group Descriptor
Material lib descriptor
StaticNormal Pattern
Pattern used to detect a normal
StaticObject Descriptor
Object descriptor
StaticSmooth Descriptor
Smooth descriptor
StaticUse Mtl Descriptor
Use a material descriptor
StaticUV Pattern
Pattern used to detect a UV set
StaticVertex Pattern
Pattern used to detect a vertex
Methods
parse
-
parse(
meshesNames: any,
data: string,
scene: Scene,
assetContainer: Nullable<AssetContainer>,
onFileToLoadFound: (fileToLoad: string) => void,
): voidFunction 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
Returns void
- meshesNames: any
Class used to load mesh data from OBJ content