SteffeX Posted September 17, 2018 Share Posted September 17, 2018 Hi I have an OBJ file that I want to use in a mobile app (within a webview). The problem is that I can only append the obj file if the web is hosted on a webserver ( according to cross domain rules). Is there a way to solve this problem? Can I store the file as a variable in the javascript and then assign the variable to the sceneloader? ( to prevent the ajax cors call) Here's my code: BABYLON.SceneLoader.Append("./", "model.obj", scene, function (newMeshes) { newMeshes.activeCamera = null; newMeshes.createDefaultCameraOrLight(true); newMeshes.activeCamera.attachControl(canvas, false); }); Quote Link to comment Share on other sites More sharing options...
Guest Posted September 17, 2018 Share Posted September 17, 2018 You can have a look to the sandbox code. We are using the filesInput object to support drag'n'drop and file picking: https://github.com/BabylonJS/Babylon.js/blob/master/sandbox/index.js#L265 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.