Skip to content

Commit b09501a

Browse files
authored
NodeObjectLoader: Fix parseAsync(). (#33377)
1 parent 56be253 commit b09501a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/loaders/nodes/NodeObjectLoader.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,24 @@ class NodeObjectLoader extends ObjectLoader {
8989

9090
}
9191

92+
/**
93+
* Async version of {@link NodeObjectLoader#parse}.
94+
*
95+
* @param {Object} json - The JSON definition
96+
* @return {Promise<Object3D>} A Promise that resolves with the parsed 3D object.
97+
*/
98+
async parseAsync( json ) {
99+
100+
this._nodesJSON = json.nodes;
101+
102+
const data = await super.parseAsync( json );
103+
104+
this._nodesJSON = null; // dispose
105+
106+
return data;
107+
108+
}
109+
92110
/**
93111
* Parses the node objects from the given JSON and textures.
94112
*

0 commit comments

Comments
 (0)