AlexB Posted June 6, 2018 Share Posted June 6, 2018 We have a project that we are converting over to Babylon from ThreeJS. One of the first issues I have to solve is loading OBJ files. I'm running into two issues. First, the OBJ loader is looking for the OBJ extension, but our API returns a url with no extension, e.g, htttp://www.examples.com/assets/12345. This then defaults to the .babylon loader and then fails. How can I load an OBJ file in this way? The second issue (which may not be a problem once I get past the first one) is that I might also have to send custom auth headers as part of the request. Is there a way to do this? Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2018 Share Posted June 6, 2018 Hello Alex and welcome! when calling the Append function, you can forcefully specify the extension to use: http://doc.babylonjs.com/api/classes/babylon.sceneloader#append when calling ImportMesh, same story: http://doc.babylonjs.com/api/classes/babylon.sceneloader#importmesh Quote Link to comment Share on other sites More sharing options...
AlexB Posted June 6, 2018 Author Share Posted June 6, 2018 Awesome! What about adding custom headers to the request? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.