Cannot import a model in codesandbox

I am trying to import a model into codesandbox but for some reason it is always undefined, as if I do not provide the right path to it, but I do.
I tried different paths but none of them worked. I do not know what else could I try.

Here is the codesandbox link

I think this line is missing in your package.json
"@babylonjs/loaders": "5.52.0",
and then, do the import in your .js:
import "@babylonjs/loaders/glTF/2.0";
And it should work after


That’s exactly what the probem was.
Thanks you!

1 Like