Jump to content

How to drag and drop model from local disc


swat0284
 Share

Recommended Posts

Hi again, Swat! 

Wow, you have about 14 questions all mixed into 3 questions, there.  ;)

First, drag'n'drop to browsers... it's an html thing... so you can learn about what types of files/data can be DnD... out on the web.  Lots of talk "out there".

But... I think you want to drag and drop models... into an already-rendered scene.  Correct?

Still, I would learn about what types of data can be dragged onto a canvas element (a URL might be a good datatype), and then... hmm... perhaps you would overload the BJS canvas with a onURLDroppedOntoMe() event/handler.  Inside the handler, you call importMesh using the URL.babylon that was dropped onto the canvas.

The "engine" doesn't report what volume and surface area that the incoming mesh will take-up.  That is calculated by code in your scene... that you write.  Likely, you will do bounding box measurements, and instantly scale the model... based-upon measurement findings.  It will be code that runs just after the mesh loading completes.

But, maybe I'm wrong, too.  :)  Others will have ideas, I'm sure.  Be patient. 

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...