Closed digitalw closed 2 days ago
For anyone looking for an answer: This seemed to have worked for me:
fetch(URL).then(response => response.blob()).then(blob => {
const file = new File([blob], fname);
this.loader.loadFile(file, group).then(loadedModel=> {...
Hi, I am sorry if this is clear, but I cant seem to be able load files from a server.
this.loader = new USDZLoader('/content/js');
....
this.loader.loadFile(URL, group)
I receive
TypeError: FileReader.readAsArrayBuffer: Argument 1 is not an object.
If i do
fetch(URL).then(response => {response.blob()).then(blob => { this.loader.loadFile(blob, group).then(loadedModel=> this.loadedModels.push(loadedModel)); });
I get
Uncaught (in promise) TypeError: filePath is undefined
What is the right way to do this? Attached is the file i am trying to load
scan.zip