File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
viewer/src/components/import-export Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,10 @@ export class GLTFManager extends IfcComponent {
89
89
/**
90
90
* Loads any glTF file into the scene using [Three.js loader](https://threejs.org/docs/#examples/en/loaders/GLTFLoader).
91
91
* @url The URL of the GLTF file to load
92
+ * @onProgress (optional) A callback function that is called when the file is loaded
92
93
*/
93
- async load ( url : string ) {
94
- const loaded = ( await this . loader . loadAsync ( url ) ) as GLTF ;
94
+ async load ( url : string , onProgress ?: ( event : ProgressEvent < EventTarget > ) => void ) {
95
+ const loaded = ( await this . loader . loadAsync ( url , onProgress ) ) as GLTF ;
95
96
const mesh = loaded . scene ;
96
97
const modelID = this . getModelID ( ) ;
97
98
this . GLTFModels [ modelID ] = mesh ;
You can’t perform that action at this time.
0 commit comments