You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to load a wavefront model, model/steve.obj that references an mtl file in the same directory. When I try to load the model with steve.setSrc('model/steve.obj', location.href), I get this strange error that seems to point to a problem in the path munging.
Error loading Document: model//undefined/steve.mtl status 404
The obj file references it as simply steve.mtl, and I've traced the origin of the extra /undefined/ to GLGE.Wavefront.prototype.getAbsolutePath—I'm just not sure what to make of it. It might be worth the effort to refactor it to use a preexisting path parsing library that knows how to handle some of the edge cases that can come up.
The text was updated successfully, but these errors were encountered:
Thought I'd fixed the problem, I'll take another look. I've rewritten the function I'll do some testing to see if it works. If not I'll take a look at closer look at js-uri, it just seems a little bit overkill adding external dependency for path lookups.
I'm trying to load a wavefront model,
model/steve.obj
that references an mtl file in the same directory. When I try to load the model withsteve.setSrc('model/steve.obj', location.href)
, I get this strange error that seems to point to a problem in the path munging.The obj file references it as simply
steve.mtl
, and I've traced the origin of the extra/undefined/
toGLGE.Wavefront.prototype.getAbsolutePath
—I'm just not sure what to make of it. It might be worth the effort to refactor it to use a preexisting path parsing library that knows how to handle some of the edge cases that can come up.The text was updated successfully, but these errors were encountered: