Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exportGLTF() {
const scene = this.props.scene;
this._isExporting = true;
this.forceUpdate();
GLTF2Export.GLBAsync(scene, "scene", {
shouldExportNode: (node) => this.shouldExport(node)
}).then((glb: GLTFData) => {
glb.downloadFiles();
this._isExporting = false;
this.forceUpdate();
}).catch(reason => {
this._isExporting = false;
this.forceUpdate();
});
}