Loading 3D Models directly into scene by drag and dropping them

Hello,

Is it somehow possible to drag and drop 3D objects from a list that is in the scene directly into the scene and move them around? Any examples of this?

Best,

Léon

First of all, you may use Sandbox code to drag and drop, then load 3D objects into a scene.
Here is the small Playground example with loading button functionality; for moving/scaling/rotation use Gizmo - https://playground.babylonjs.com/#SA6QBM#34

Yes, possible. I guess your question is more like “is it possible to drag a list of HTML li items to the scene and move them around?” because if 3D objects are already in the scene, why would you want to drop them? or where to drop them?

I have an example of this drag and drop behavior over at https://3designer.app:
drag-drop-3d-model

Unfortunately the code is not in the playground, you will have to build HTML drag and drop behavior. In my case, I wrote my own logic and wrapped it in a React component that fires Redux action, which then updates Babylon by importing the 3D object when dragging begins.

3 Likes

Hello just checking in, was your question answered? @Leon_Servais