Skip to content
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

Write documentation how to export your hubs scene and run it #18

Open
vincentfretin opened this issue Mar 17, 2024 · 7 comments
Open

Write documentation how to export your hubs scene and run it #18

vincentfretin opened this issue Mar 17, 2024 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@vincentfretin
Copy link
Member

vincentfretin commented Mar 17, 2024

Write documentation how to export your hubs scene from Spoke and downloading the linked assets (and later using the export feature that the Hubs team is working on), upload assets to glitch assets or a public github repo and using jsdelivr cdn (reading the terms, it allows to deliver glb files for free but it may have restrictions on size) but you don't even need jsdelivr cdn, you can just enable GitHub Pages on your public repo.

@vincentfretin vincentfretin added the documentation Improvements or additions to documentation label Mar 17, 2024
@vincentfretin vincentfretin self-assigned this Mar 17, 2024
@vincentfretin vincentfretin moved this to Planned in Sponsorship Mar 17, 2024
@vincentfretin
Copy link
Member Author

vincentfretin commented Mar 17, 2024

The only export I did was from a remix of the outdoor festival scene I pushed in https://github.com/c-frame/outdoor-festival, using File->Export as binary glTF in Spoke. It worked fine for this scene. I don't have any other scene in hubs personally. Then I retrieved the urls for the different linked assets like mp3 and other glb with console.log of the hubs gtlf extensions from my importer to not miss any link and I downloaded them all.

In case you have an error exporting from Spoke, if your scene was previously published successfully, you can get the glb url by accessing a room that uses this scene, inspect the page with Chrome, in Console search for "Scene" you will have a log with Scene URL and the url with a .bin extension, download it, rename it to glb and quickly verify it on https://gltf-viewer.donmccurdy.com/ to see if the file is correct.

If you added some objects in a room and pinned them, then those are in a separate gltf file, you can download the file from https://hubs.mozilla.com/xxxxxxx/objects.gltf where xxxxxxx is your room id.

@jywarren
Copy link

Just reporting that I downloaded the repo today, swapped in my .bin download of a big (70mb) scene, renamed it to scene.glb, and inserted it to replace this line:

<a-asset-item id="sceneGLB" src="./hubs_components_example_001.glb"></a-asset-item>

And added an ambient light on line 144 (my scene lights didn't get enabled?):

<a-entity light="type: ambient; intensity: 0.2"></a-entity>

https://github.com/c-frame/aframe-gltf-model-plus/blob/da35b7451d8cf0e7173380ff5a9a2f7f40a5fe8d/examples/playground/index.html#L144C23-L144C24

and ran http-server (an NPM module i use) to start the server. It worked immediately, with ability to navigate with Hubs commands AWSD!

Image

Just offering thanks, this is so cool!

@vincentfretin
Copy link
Member Author

That's great!
I indeed don't support the lights from hubs component currently, I will implement them in #30
The repo has actually a server, you can also run it with:
npm install
npm start
I'll add that to the README.

@jywarren
Copy link

I'd love next to try to get the objects.gltf running but this'll await #13 as my objects are all images. Will check back in when I do, and happy to write some simple docs on this.

@vincentfretin
Copy link
Member Author

I quickly wrote this doc f3265af in the README.
If it's not clear enough or you have something to add, don't hesitate to create a PR.

@vincentfretin
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Planned
Development

No branches or pull requests

2 participants