Jump to content

Importing local meshes


MadnessOfMadara
 Share

Recommended Posts

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)
 

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...