-
-
Notifications
You must be signed in to change notification settings - Fork 1
Drag and drop models from a library #11
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
Comments
This is interesting! Would these be only models which are already hosted somewhere online, or might this include ones dragged from a user's desktop? That sounds a little complex i.e. where to store the .glb - I've seen data-uri encoded files but it makes the .html quite unmanageably gigantic. Is there any way to use the File System API or something to store dragged-in assets and then offer a .zip of everything as an export? Sorry this scope is a bit bigger maybe than you're imagining... |
What I currently have implemented in a project is just a json file for the library referencing files on a server, so you can create gltf-model component that references that url on a server, and the scene json is saved on the server. |
Ah I see. Yes I saw that #9 and it seems really promising. I also noticed
it's possible to generate a zip from JS... Looks promising too!
https://stuk.github.io/jszip/
…On Wed, Mar 12, 2025, 6:02 AM Vincent Fretin ***@***.***> wrote:
What I currently have implemented in a project is just a json file for the
library referencing files on a server, so you can create gltf-model
component that references that url on a server, and the scene json is saved
on the server.
Here I was only talking about drag and drop from a UI panel that reads
that library json file to show the available models, so not drag and drop
from user desktop at all, but that's something indeed to consider, thanks
for mentioning it.
You can indeed drag and drop and just use a data uri on gtlf-model, that's
what we do in gltf-model-plus repo playground example for development, but
as you said exporting then the html with data uri for the models would be
huge.
The File System API is something I want to explore in #9
<#9>, we could potentially
create the drag and dropped glb on the file system instead of using a data
uri.
Creating a zip of the experience with all relative assets could also be
great indeed if the scene and assets are saved directly on a server. If the
scene html and assets are already on your machine, you can just use the
archive feature on a directory of your OS for that.
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J7H42IG22NVLDQ7BXL2UAAZTAVCNFSM6AAAAABT4MLGAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJXGMYTQMRUGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: vincentfretin]*vincentfretin* left a comment
(c-frame/aframe-editor#11)
<#11 (comment)>
What I currently have implemented in a project is just a json file for the
library referencing files on a server, so you can create gltf-model
component that references that url on a server, and the scene json is saved
on the server.
Here I was only talking about drag and drop from a UI panel that reads
that library json file to show the available models, so not drag and drop
from user desktop at all, but that's something indeed to consider, thanks
for mentioning it.
You can indeed drag and drop and just use a data uri on gtlf-model, that's
what we do in gltf-model-plus repo playground example for development, but
as you said exporting then the html with data uri for the models would be
huge.
The File System API is something I want to explore in #9
<#9>, we could potentially
create the drag and dropped glb on the file system instead of using a data
uri.
Creating a zip of the experience with all relative assets could also be
great indeed if the scene and assets are saved directly on a server. If the
scene html and assets are already on your machine, you can just use the
archive feature on a directory of your OS for that.
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J7H42IG22NVLDQ7BXL2UAAZTAVCNFSM6AAAAABT4MLGAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJXGMYTQMRUGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Allow to define a library of models in the editor to be used in any open projects.
There is an old draft PR in #1 but I did a better one in a customer project.
The text was updated successfully, but these errors were encountered: