Hello everyone,
I am working on a three project at the moment where I want to load in a 3d model from an external JSON file that I receive from the API. I am using the ObjectLoader from three to do this. The code that I have right now looks like this:
async function createModel() {
const mapObject = await loader.loadAsync(areas[0]?.model?.url ?? '');
}
createModel();
}, []);```
When I run this code, I get the next error:
`VM2766:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON`
Is there someone that knows a bit more about loading in external JSON files? that can help me with this problem.