-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag n drop glb file from a library #1
base: master
Are you sure you want to change the base?
Conversation
@kfarr is this implementation if you click instead of drag, it will spawn the model on the center of the viewport on the ground, with a message saying that you can use drag and drop. |
@vincentfretin that's a really good idea, building on that: As a user hovers over a model the destination cursor is shown at the default location. If they click, it will be spawned in that location. If they click to drag the model onto the scene, the cursor previews the drop zone where the model will be placed upon click up. Best of both worlds! |
drag n drop in FrameVR https://twitter.com/frame_vr/status/1674160651667906560 🔥 |
You can sponsor $100 to vincentfretin fully or partially to work on this feature. Find other work you can sponsor at https://github.com/c-frame/sponsorship |
@3DStreet sponsored me to work on this issue. Thank you! |
As part of this work where you can drag and drop defined glb in a library, I'll also define an api to register primitives to be drag and dropped (see my comment #3 (comment)). |
@vincentfretin Our use case will basically come from a JSON list but if there is an API then I'm sure it could be simple to parse said JSON and iterate through it making the api call for each, so very open to whatever you propose, thanks for thinking through multiple use cases |
Models library in json format referencing glb files that can be drag n dropped into the scene.
Prior work with old Google Blocks, see tweet and code, code that do the drag'n drop here (jQuery) and here.
I reproduced the drag'n drop in React/tailwindcss on my project a few months ago but didn't go further yet, I opened the PR as draft with my current code as is. You need to rewrite the tailwindcss with stylus or vanilla css and replace the library with your own models if you want to see anything.
Example of json library: