|
@@ -849,11 +849,11 @@ export class OBJFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPlugi
|
|
|
|
|
|
//Get information about one position possible for the vertices
|
|
//Get information about one position possible for the vertices
|
|
} else if (this.vertexPattern.test(line)) {
|
|
} else if (this.vertexPattern.test(line)) {
|
|
- result = line.match(/\S+/g)!; // match will return non-null due to passing regex pattern
|
|
|
|
|
|
+ result = line.match(/[^ ]+/g)!; // match will return non-null due to passing regex pattern
|
|
|
|
|
|
- //Value of result with line: "v 1.0 2.0 3.0"
|
|
|
|
|
|
+ // Value of result with line: "v 1.0 2.0 3.0"
|
|
// ["v", "1.0", "2.0", "3.0"]
|
|
// ["v", "1.0", "2.0", "3.0"]
|
|
- //Create a Vector3 with the position x, y, z
|
|
|
|
|
|
+ // Create a Vector3 with the position x, y, z
|
|
positions.push(new Vector3(
|
|
positions.push(new Vector3(
|
|
parseFloat(result[1]),
|
|
parseFloat(result[1]),
|
|
parseFloat(result[2]),
|
|
parseFloat(result[2]),
|
|
@@ -1012,7 +1012,7 @@ export class OBJFileLoader implements ISceneLoaderPluginAsync, ISceneLoaderPlugi
|
|
//Apply smoothing
|
|
//Apply smoothing
|
|
} else if (this.smooth.test(line)) {
|
|
} else if (this.smooth.test(line)) {
|
|
// smooth shading => apply smoothing
|
|
// smooth shading => apply smoothing
|
|
- //Toda y I don't know it work with babylon and with obj.
|
|
|
|
|
|
+ //Today I don't know it work with babylon and with obj.
|
|
//With the obj file an integer is set
|
|
//With the obj file an integer is set
|
|
} else {
|
|
} else {
|
|
//If there is another possibility
|
|
//If there is another possibility
|