I have a tool that takes input via drag&drop. I am dragging and dropping a .json file into the babylon.js scene, and inside the onDrop event it visualizes the json file as 3D.
I want to covert this result to the GLTF file, but I could not do it.
I am using the sample below for exporting.
import { GLTF2Export } from 'babylonjs-serializers';
GLTF2Export.GLTFAsync(scene, "fileName").then(gltf => gltf.downloadFiles());
GLTFAsync method everytime returns a pending promise. It will never produce a resolved or rejected promise. This is my problem. .then() side of the implementation is not working since the promise is pending.
How can I do the conversion from json to gltf. This is an important issue for a project in my company.