-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DownloadModels() use. #74
Comments
I pasted the following into requirebin and it worked: const OBJ = require('webgl-obj-loader');
// chaining promise approach
OBJ.downloadModels([{
obj: 'http://frenchtoast747.github.io/webgl-obj-loader/models/suzanne.obj',
mtl: true
}])
.then((data) => console.log("success:", data))
.catch((e) => console.error("Failure:", e));
// resolved/rejected in the same `.then()`
OBJ.downloadModels([{
obj: 'http://frenchtoast747.github.io/webgl-obj-loader/models/suzanne.obj',
mtl: true
}])
.then(
function(data) { console.log("success:", data) },
function(e) { console.error("Failure:", e) }
); I apologize, I'd link to a working snippet, but RequireBin is not letting me save the snippet at the moment. I would expect you to see something in the console with the code you've pasted above. The only thing that looks odd to me is the URL |
I was using the minimized version webgl-obj-loader.min.js and could not make it work, I tried with the full version and it actually printed success with the same code I was using before. I don't know much about javascript but I guess there is something wrong with the minimization, maybe some name conflict. |
Thanks for the details! I will look into this more. |
I'm trying to use the downloadModels() function like this:
The files are actually successfully requested to the server but nothing is ever printed to the console.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: