-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
*Enhancement* Add ability for GLTF loader to load embeded dataURLs #5619
Comments
This out of the scope of A-Frame core. I encourage you to build a custom component and share it with the community |
FYI using |
or as a data attribute |
Thank you very much, @vincentfretin and @polytropoi , I'm excited to try your suggestions! :-) |
Nice to know it works. We should probably document |
Description:
I'm a non-professional novice 3D WebGL programmer and recently started using A-Frame and like it very much! It's very easy to just add the CDNs for A-Frame, put together some ideas with 3D models, and then use A-Frames simple framework to build my scenes. With how easy A-Frame is to use, I was hoping then just to embed the framework and the models inside a single-file .html and share them with my friends and family to try out by sending them a link to download the single-file .html from my Dropbox or other storage. I'm currently able to do so for .obj models without external textures (i.e. that contain only .obj and .mtl files) through A-Frame's .obj loader by inlining the js A-Frame framework code then using dataURLs to paste in the .obj and .mtl files as sources. However, the obj loader doesn't have a mechanism to upload any textures for me to embed for more complex .obj 3D models, and it didn't seem that the GLTF model loader is able to handle either .gltf(embedded) or base64 encrypted .glb dataURLs as a source to do the same. Thus, I'm not able to easily share my projects with my friends and family who may use different computer systems then I do or have different operating systems than i use (the advantage of distributing cross-platform programs as .html/js/embedded data in dataURLs).
I would prefer not to set up and host my own server or publish all of my creations to a commercial hosting site just to be able to share A-Frame creations with my friends and family. If the GLTF loader could load embedded dataURLs, I could just embed my creations in a single-file .html, send my friends and family a link to download the file, and they could then decide to download the file and open it in their browser, review its contents with a text editor, or discard the file when they are done.
Thank you for considering this as a future enhancement.
For the .obj model loader:
The above works (but as I mentioned, there isn't a way to load texture files specified from the .mtl file).
doesn't seem to work (neither a .gltf nor a .glb model get loaded into the scene)
Attached are some quick projects I put together that I would love to be able to package as a single file .html to send to friends (and to store on my phone/mobile devices to use). :-)
The text was updated successfully, but these errors were encountered: