Accessing blob files in Code Sandbox - ThreeJS

78 views Asked by At

We are trying to implement ThreeJS library via Code Sandbox widget in Slate. We have successfully loaded a model by embedding the .GTLF file by hosting the model in code repo, transform it to JSON, then pass it to Slate and loaded via ThreeJS.

However, we would like now to directly fetch the model file from Compass folder as the JSON transformation is not optimal.

Any ideas how could this be done ?

Successfully loaded a model via ThreeJS however it needed to be tweaked to a JSON then pass to Slate.

1

There are 1 answers

0
ZettaP On

You can't perform API calls from Code Sandbox in Slate.

You could use the "import libraries" mechanism of Code Sandbox to import a serialized version of your model, uploaded to a Compass folder. Maybe that would work with other extension than .js ?

You could use Service APIs in Slate, as stated in the docs, as they might give you more flexibility, but this won't be available out of the box.