Loading Tree assets


#1

I’m trying to run the ‘hardware instancing’ example using a local server but I can’t get past an error loading the assets, which I grabbed from here.

The error I get is:
babylon.custom.js:16 BJS - [10:43:01]: Unable to import meshes from /textures/Tree/tree.babylon: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse

I wonder if I should be using a different version? I would like to be able to run the example without needing an internet connection. Thanks.


#2

I think this is a CORS issue. Can you make sure that your local server is setup to serve .babylon file MIME type ?


#3

Hmm, I’m using Visual Studio Code’s Liver Server extension. I’m not sure how I can set it up to serve this type of file. I’ll have a quick search and see if I can find a way to do it.