MadnessOfMadara Posted October 1, 2018 Share Posted October 1, 2018 I am having difficulty loading a model from my local drive as opposed to from the internet. The problem has to due with loading from local really fucks things up for some reason. I know it's the local load because I took the mixamo in your example and it works fine when from your server, but not my local. And for the application I have in mind, I need clients to upload locally. Can anyone help me? BABYLON.SceneLoader.ImportMesh("","","https://www.babylonjs-playground.com/scenes/dummy3.babylon",scene, function (meshes, particleSystems, skeletons) brianzinn 1 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted October 1, 2018 Share Posted October 1, 2018 try with "data:" + fileContent: https://www.babylonjs-playground.com/#16XKTO#40 Basically, if sceneFileName starts with "data:" then it will trigger loading locally So, this ought to work with local upload. I would suggest looking through the source for sandbox, which does similar: https://sandbox.babylonjs.com/ edit: https://github.com/BabylonJS/Babylon.js/blob/master/sandbox/index.js (lots of goodies there, too) GameMonetize and trevordev 2 Quote Link to comment Share on other sites More sharing options...
MadnessOfMadara Posted October 2, 2018 Author Share Posted October 2, 2018 Didn't use data, but you did send me on the correct path. Used file: instead and got the file object from file input. Thanks. trevordev and Sebavan 2 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.