Skip to content

Commit 6f83240

Browse files
authored
Update README.md
1 parent 8af53a6 commit 6f83240

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Include the loader library in your project:
99
```
1010

1111
Then create an instance of BOMLoader and specify the file path to load:
12-
### Javascript
1312
```javascript
1413
var filePath = 'https://example.com/path/to/file.bom';
1514

@@ -23,5 +22,20 @@ loader.load(filePath, function(obj) {
2322
});
2423
```
2524

25+
A convenience loader is also provided to load one or more files in the order provided:
26+
```javascript
27+
var filePaths = [
28+
{ name: 'File 1', url: 'https://example.com/path/to/file1.bom' },
29+
{ name: 'File 2', url: 'https://example.com/path/to/file2.bom' }
30+
];
31+
32+
THREE.BOMLoaderUtil.multiload(filePaths, function(objects) {
33+
for(var object of objects) {
34+
console.log('File loaded: ', object.name);
35+
scene.add(object.object); // Add object to scene once loaded.
36+
}
37+
});
38+
```
39+
2640
## See also
2741
[obj2bom](https://github.com/NGenesis/bom-obj2bom) - A command line tool to convert OBJ and associated MTL files to BOM (Binary Object/Material) file format.

0 commit comments

Comments
 (0)