| 418 | if (fileType.match(/\.stl$/i)) { |
| 419 | const { data } = await request(path, 'arrayBuffer'); |
| 420 | const cb = () => { |
| 421 | parseSTL(model, data); |
| 422 | |
| 423 | if (normalize) { |
| 424 | model.normalize(); |
| 425 | } |
| 426 | |
| 427 | if (flipU) { |
| 428 | model.flipU(); |
| 429 | } |
| 430 | |
| 431 | if (flipV) { |
| 432 | model.flipV(); |
| 433 | } |
| 434 | model._makeTriangleEdges(); |
| 435 | |
| 436 | if (successCallback) { |
| 437 | return successCallback(model); |
| 438 | } else { |
| 439 | return model; |
| 440 | } |
| 441 | }; |
| 442 | return this._internal ? this._internal(cb) : cb(); |
| 443 | |
| 444 | } else if (fileType.match(/\.obj$/i)) { |